Class AutoExpandArrayTraversalStep<DataType>
java.lang.Object
com.bazaarvoice.jolt.traversr.traversal.BaseTraversalStep<List<Object>, DataType>
com.bazaarvoice.jolt.traversr.traversal.ArrayTraversalStep<DataType>
com.bazaarvoice.jolt.traversr.traversal.AutoExpandArrayTraversalStep<DataType>
- All Implemented Interfaces:
TraversalStep<List<Object>, DataType>
Subclass of ArrayTraversalStep that does not care about array index numbers.
Instead it will just do an array add on any set.
Consequently, get and remove are rather meaningless.
This exists, because we need a way in the human readable path, so say that we
always want a list value.
Example : "tuna.marlin.[]"
We want the value of marlin to always be a list, and anytime we set data
to marlin, it should just be added to the list.
-
Nested Class Summary
Nested classes/interfaces inherited from interface TraversalStep
TraversalStep.Operation -
Field Summary
Fields inherited from class BaseTraversalStep
child, traversr -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the data for the key from the provided tree object.overwriteSet(List<Object> list, String key, DataType data) Insert the data into the tree, overwriting any data that is there.Remove and return the data for the key from the provided tree object.Methods inherited from class ArrayTraversalStep
getStepType, newContainerMethods inherited from class BaseTraversalStep
getChild, traverse
-
Constructor Details
-
AutoExpandArrayTraversalStep
-
-
Method Details
-
get
Description copied from interface:TraversalStepReturn the data for the key from the provided tree object.- Specified by:
getin interfaceTraversalStep<List<Object>, DataType>- Overrides:
getin classArrayTraversalStep<DataType>- Returns:
- data object if available, or null.
-
remove
Description copied from interface:TraversalStepRemove and return the data for the key from the provided tree object.- Specified by:
removein interfaceTraversalStep<List<Object>, DataType>- Overrides:
removein classArrayTraversalStep<DataType>- Returns:
- data object if available, or null.
-
overwriteSet
Description copied from interface:TraversalStepInsert the data into the tree, overwriting any data that is there.- Specified by:
overwriteSetin interfaceTraversalStep<List<Object>, DataType>- Overrides:
overwriteSetin classArrayTraversalStep<DataType>- Returns:
- returns the data object if successful or null if it could not
-