public class MapTraversalStep<DataType> extends BaseTraversalStep<Map<String,Object>,DataType>
TraversalStep.Operationchild, traversr| Constructor and Description |
|---|
MapTraversalStep(Traversr traversr,
TraversalStep child) |
| Modifier and Type | Method and Description |
|---|---|
Optional<DataType> |
get(Map<String,Object> map,
String key)
Return the data for the key from the provided tree object.
|
Class<?> |
getStepType()
Return the Class of the Generic T, so that it can be used in an
"instanceof" style check.
|
Map<String,Object> |
newContainer()
Create a new mutable Map or List, suitable for this PathElement to traverse.
|
Optional<DataType> |
overwriteSet(Map<String,Object> map,
String key,
DataType data)
Insert the data into the tree, overwriting any data that is there.
|
Optional<DataType> |
remove(Map<String,Object> map,
String key)
Remove and return the data for the key from the provided tree object.
|
getChild, traversepublic MapTraversalStep(Traversr traversr, TraversalStep child)
public Class<?> getStepType()
TraversalSteppublic Map<String,Object> newContainer()
TraversalSteppublic Optional<DataType> get(Map<String,Object> map, String key)
TraversalSteppublic Optional<DataType> remove(Map<String,Object> map, String key)
TraversalStepCopyright © 2023. All rights reserved.