public class ShiftrTraversr<DataType> extends SimpleTraversr<DataType>
Constructor and Description |
---|
ShiftrTraversr(java.util.List<java.lang.String> paths) |
ShiftrTraversr(java.lang.String humanPath) |
Modifier and Type | Method and Description |
---|---|
Optional<DataType> |
handleFinalSet(TraversalStep traversalStep,
java.lang.Object tree,
java.lang.String key,
DataType data)
Do a Shift style insert :
1) if there is no data "there", then just set it
2) if there is already a list "there", just add the data to the list
3) if there something other than a list there, grab it and stuff it and the data into a list
and overwrite what is there with a list.
|
handleIntermediateGet
public ShiftrTraversr(java.lang.String humanPath)
public ShiftrTraversr(java.util.List<java.lang.String> paths)
public Optional<DataType> handleFinalSet(TraversalStep traversalStep, java.lang.Object tree, java.lang.String key, DataType data)
handleFinalSet
in class SimpleTraversr<DataType>