T
- the type for the values in the mappublic class WriteMap<T> extends WriteExpressionImpl<Map<String,T>>
This expression will take the values from the map and will write them to each child expression matching the key to the name of 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.
Constructor and Description |
---|
WriteMap()
Creates a new group.
|
Modifier and Type | Method and Description |
---|---|
WriteMap<T> |
add(WriteExpression<T> expression)
Adds the expression to the map.
|
WriteMap<T> |
add(WriteExpressionList<T> expressions)
Adds the expressions to the map.
|
WriteMap<T> |
clear()
Removes all the expressions currently in the map.
|
void |
fillWriteRecipe(PVWriterDirector director,
WriteRecipeBuilder builder)
Prepares the recipe to connect the channels needed by this expression.
|
WriteMap<T> |
remove(Collection<String> names)
Removes the expressions from the map.
|
WriteMap<T> |
remove(String name)
Removes the expression with the given name.
|
int |
size()
Returns the number of expressions in the group.
|
as, getName, getWriteExpressionImpl, getWriteFunction
and, getWriteExpressions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
and, getWriteExpressions
public WriteMap<T> clear()
public int size()
public WriteMap<T> add(WriteExpression<T> expression)
expression
- the expression to be addedpublic WriteMap<T> add(WriteExpressionList<T> expressions)
expressions
- the new list of expressionspublic WriteMap<T> remove(String name)
name
- the name of the expression to removepublic WriteMap<T> remove(Collection<String> names)
names
- the names of the expressions to removepublic void fillWriteRecipe(PVWriterDirector director, WriteRecipeBuilder builder)
WriteExpression
A dynamic expression, one for which the child expressions can change, can keep a reference to the director to connect/disconnect new child expressions.
fillWriteRecipe
in interface WriteExpression<Map<String,T>>
fillWriteRecipe
in class WriteExpressionImpl<Map<String,T>>
director
- the director for the readerbuilder
- the recipe to fillCopyright © 2010–2015. All rights reserved.