Class BaseTraversalStep<StepType,DataType>
java.lang.Object
com.bazaarvoice.jolt.traversr.traversal.BaseTraversalStep<StepType,DataType>
- All Implemented Interfaces:
TraversalStep<StepType,DataType>
- Direct Known Subclasses:
ArrayTraversalStep, MapTraversalStep
public abstract class BaseTraversalStep<StepType,DataType>
extends Object
implements TraversalStep<StepType,DataType>
-
Nested Class Summary
Nested classes/interfaces inherited from interface TraversalStep
TraversalStep.Operation -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TraversalStep
get, getStepType, newContainer, overwriteSet, remove
-
Field Details
-
child
-
traversr
-
-
Constructor Details
-
BaseTraversalStep
-
-
Method Details
-
getChild
- Specified by:
getChildin interfaceTraversalStep<StepType,DataType> - Returns:
- the child Traversal or null if this Traversal has no child
-
traverse
public final Optional<DataType> traverse(StepType tree, TraversalStep.Operation op, Iterator<String> keys, DataType data) Description copied from interface:TraversalStepThe meat of the Traversal. Pull a key from the iterator, use it to make the traversal, and then call traverse on your child Traversal.- Specified by:
traversein interfaceTraversalStep<StepType,DataType> - Parameters:
tree- tree of data to walkop- the Operation to perform is this is the last node of the Traversalkeys- keys to usedata- the data to place if the operation is SET- Returns:
- if SET, null for fail or the "data" object for ok. if GET, PANTS
-