Package com.rpl.rama.test
Interface TestPState
- All Superinterfaces:
AutoCloseable,Closeable
Helper utility compatible with
Block.localSelect(java.lang.String, com.rpl.rama.Path) and Block.localTransform(java.lang.String, com.rpl.rama.Path).
This can be used in unit tests of snippets of dataflow code, or it can be used to explore PStates and paths.
This object should be closed when no longer needed to clean up its resources.-
Method Summary
Modifier and TypeMethodDescriptionstatic TestPStatecreate(PState.Schema schema) Creates a TestPState with the given schema.static TestPStateCreates a TestPState with the given schema.<T> List<T> Queries PState withPath.<T> TQueries PState withPaththat must navigate to exactly one value.voidTransforms PState withPath.
-
Method Details
-
create
Creates a TestPState with the given schema. -
create
Creates a TestPState with the given schema. -
select
Queries PState withPath.- Type Parameters:
T- Type of navigated values- Parameters:
path- Query path- Returns:
- List of navigated values
- See Also:
-
selectOne
Queries PState withPaththat must navigate to exactly one value.- Type Parameters:
T- Type of navigated value- Parameters:
path- Query path- Returns:
- Navigated value
- See Also:
-
transform
Transforms PState withPath.- Parameters:
path- transform path- See Also:
-