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

java.lang.Object
  extended by org.epics.pvmanager.expression.SourceRateExpressionListImpl<R>
      extended by org.epics.pvmanager.expression.SourceRateExpressionImpl<R>
Type Parameters:
R - type of the read payload
All Implemented Interfaces:
SourceRateExpression<R>, SourceRateExpressionList<R>

public class SourceRateExpressionImpl<R>
extends SourceRateExpressionListImpl<R>
implements SourceRateExpression<R>

Implementation class for SourceRateExpression.

Author:
carcassi

Constructor Summary
SourceRateExpressionImpl(SourceRateExpressionList<?> childExpressions, Function<R> function, java.lang.String defaultName)
          Creates a new source rate expression.
SourceRateExpressionImpl(java.lang.String pvName, java.lang.Class<R> pvType)
          Constructor that represents a single pv of a particular type.
 
Method Summary
 SourceRateExpressionImpl<R> as(java.lang.String name)
          Changes the name for this expression
 Function<R> getFunction()
          The function that calculates this expression.
 java.lang.String getName()
          Name of the expression.
 SourceRateExpressionImpl<R> getSourceRateExpressionImpl()
          The implementation of this expression.
 
Methods inherited from class org.epics.pvmanager.expression.SourceRateExpressionListImpl
and, getSourceRateExpressions
 
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.SourceRateExpressionList
and, getSourceRateExpressions
 

Constructor Detail

SourceRateExpressionImpl

public SourceRateExpressionImpl(java.lang.String pvName,
                                java.lang.Class<R> pvType)
Constructor that represents a single pv of a particular type.

Parameters:
pvName - the name of the pv
pvType - the type of the pv

SourceRateExpressionImpl

public SourceRateExpressionImpl(SourceRateExpressionList<?> childExpressions,
                                Function<R> function,
                                java.lang.String defaultName)
Creates a new source rate expression.

Parameters:
childExpressions - the expressions used as arguments by this expression
function - the function that will calculate the value for this expression
defaultName - the name for this expression
Method Detail

as

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

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

getName

public final java.lang.String getName()
Description copied from interface: SourceRateExpression
Name of the expression.

Specified by:
getName in interface SourceRateExpression<R>
Returns:
the expression name

getFunction

public final Function<R> getFunction()
Description copied from interface: SourceRateExpression
The function that calculates this expression.

Specified by:
getFunction in interface SourceRateExpression<R>
Returns:
the expression function

getSourceRateExpressionImpl

public final SourceRateExpressionImpl<R> getSourceRateExpressionImpl()
Description copied from interface: SourceRateExpression
The implementation of this expression.

Specified by:
getSourceRateExpressionImpl in interface SourceRateExpression<R>
Returns:
the implementation