T
- the type for the values in the mappublic class ReadMap<T> extends DesiredRateExpressionImpl<Map<String,T>>
This expression returns a map where the key is the name of the child expression and the value is the value returned by the child expression. The map is dynamic: the child expressions can be added and removed while the reader is active.
There is currently no way to retrieve the individual errors for each element of the map. If the value is a VType, the connection can be retrieved by looking at the alarm.
Constructor and Description |
---|
ReadMap()
Creates a new group.
|
Modifier and Type | Method and Description |
---|---|
ReadMap<T> |
add(DesiredRateExpression<T> expression)
Adds the expression to the map.
|
ReadMap<T> |
add(DesiredRateExpressionList<T> expressions)
Adds the expressions to the map.
|
ReadMap<T> |
clear()
Removes all the expressions currently in the map.
|
void |
fillReadRecipe(PVDirector director,
ReadRecipeBuilder builder)
Prepares the recipe to connect the channels needed by this expression.
|
ReadMap<T> |
remove(Collection<String> names)
Removes the expressions from the map.
|
ReadMap<T> |
remove(String name)
Removes the expression with the given name.
|
int |
size()
Returns the number of expressions in the group.
|
as, getDesiredRateExpressionImpl, getFunction, getName
and, getDesiredRateExpressions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
and, getDesiredRateExpressions
public ReadMap<T> clear()
public int size()
public ReadMap<T> add(DesiredRateExpression<T> expression)
expression
- the expression to be addedpublic ReadMap<T> add(DesiredRateExpressionList<T> expressions)
expressions
- the new list of expressionspublic ReadMap<T> remove(String name)
name
- the name of the expression to removepublic ReadMap<T> remove(Collection<String> names)
names
- the names of the expressions to removepublic void fillReadRecipe(PVDirector director, ReadRecipeBuilder builder)
DesiredRateExpression
A dynamic expression, one for which the child expressions can change, can keep a reference to the director to connect/disconnect new child expressions.
fillReadRecipe
in interface DesiredRateExpression<Map<String,T>>
fillReadRecipe
in class DesiredRateExpressionImpl<Map<String,T>>
director
- the director for the readerbuilder
- the recipe to fillCopyright © 2010–2015. All rights reserved.