org.epics.pvmanager.expression
Class DesiredRateExpressionImpl<R>

java.lang.Object
  extended by org.epics.pvmanager.expression.DesiredRateExpressionListImpl<R>
      extended by org.epics.pvmanager.expression.DesiredRateExpressionImpl<R>
Type Parameters:
R - type of the read payload
All Implemented Interfaces:
DesiredRateExpression<R>, DesiredRateExpressionList<R>
Direct Known Subclasses:
DynamicGroup, WaterfallPlot

public class DesiredRateExpressionImpl<R>
extends DesiredRateExpressionListImpl<R>
implements DesiredRateExpression<R>

Implementation class for DesiredRateExpression.

Author:
carcassi

Constructor Summary
DesiredRateExpressionImpl(DesiredRateExpressionList<?> childExpressions, Function<R> function, java.lang.String defaultName)
          Creates a new aggregated expression.
DesiredRateExpressionImpl(SourceRateExpression<?> expression, Function<R> collector, java.lang.String defaultName)
          Creates a new expression at the desired rate.
 
Method Summary
 DesiredRateExpressionImpl<R> as(java.lang.String name)
          Changes the name for this expression
 DataRecipe getDataRecipe()
          The recipe for connect the channels for this expression.
 DesiredRateExpressionImpl<R> getDesiredRateExpressionImpl()
          The implementation for this expression.
 Function<R> getFunction()
          The function that calculates new values for this expression.
 java.lang.String getName()
          The default name for a PV of this expression.
 
Methods inherited from class org.epics.pvmanager.expression.DesiredRateExpressionListImpl
and, getDesiredRateExpressions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.epics.pvmanager.expression.DesiredRateExpressionList
and, getDesiredRateExpressions
 

Constructor Detail

DesiredRateExpressionImpl

public DesiredRateExpressionImpl(SourceRateExpression<?> expression,
                                 Function<R> collector,
                                 java.lang.String defaultName)
Creates a new expression at the desired rate. Use this constructor when making an DesiredRateExpression out of a collector and a SourceRateExpression.

Parameters:
expression - the original source rate expression
collector - the collector for the original source
defaultName - the display name of the expression

DesiredRateExpressionImpl

public DesiredRateExpressionImpl(DesiredRateExpressionList<?> childExpressions,
                                 Function<R> function,
                                 java.lang.String defaultName)
Creates a new aggregated expression. Use this constructor when making a DesiredRateExpression that is a function of a number of DesiredRateExpressions.

Parameters:
childExpressions - expressions for the arguments of the function
function - the function that calculates the value of the new expression
defaultName - the display name of the expression
Method Detail

as

public final DesiredRateExpressionImpl<R> as(java.lang.String name)
Description copied from interface: DesiredRateExpression
Changes the name for this expression

Specified by:
as in interface DesiredRateExpression<R>
Parameters:
name - new name
Returns:
this

getName

public final java.lang.String getName()
The default name for a PV of this expression.

Specified by:
getName in interface DesiredRateExpression<R>
Returns:
the default name

getDataRecipe

public final DataRecipe getDataRecipe()
The recipe for connect the channels for this expression.

Specified by:
getDataRecipe in interface DesiredRateExpression<R>
Returns:
a data recipe

getFunction

public final Function<R> getFunction()
The function that calculates new values for this expression.

Specified by:
getFunction in interface DesiredRateExpression<R>
Returns:
a function

getDesiredRateExpressionImpl

public final DesiredRateExpressionImpl<R> getDesiredRateExpressionImpl()
The implementation for this expression.

Specified by:
getDesiredRateExpressionImpl in interface DesiredRateExpression<R>
Returns:
returns the implementation for this desired rate