Class ShiftrTraversr<DataType>


  • public class ShiftrTraversr<DataType>
    extends SimpleTraversr<DataType>
    Traverser that does not overwrite data.
    • Constructor Summary

      Constructors 
      Constructor Description
      ShiftrTraversr​(java.lang.String humanPath)  
      ShiftrTraversr​(java.util.List<java.lang.String> paths)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShiftrTraversr

        public ShiftrTraversr​(java.lang.String humanPath)
      • ShiftrTraversr

        public ShiftrTraversr​(java.util.List<java.lang.String> paths)
    • Method Detail

      • handleFinalSet

        public 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.
        Overrides:
        handleFinalSet in class SimpleTraversr<DataType>
        Returns:
        the data object if the set was successful, or null if not