Class ArrayTraversalStep<DataType>
java.lang.Object
com.bazaarvoice.jolt.traversr.traversal.BaseTraversalStep<List<Object>,DataType>
com.bazaarvoice.jolt.traversr.traversal.ArrayTraversalStep<DataType>
- All Implemented Interfaces:
TraversalStep<List<Object>,
DataType>
- Direct Known Subclasses:
AutoExpandArrayTraversalStep
TraversalStep that expects to handle List objects.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.bazaarvoice.jolt.traversr.traversal.TraversalStep
TraversalStep.Operation
-
Field Summary
Fields inherited from class com.bazaarvoice.jolt.traversr.traversal.BaseTraversalStep
child, traversr
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
ensureArraySize
(List<Object> list, Integer upperIndex) Return the data for the key from the provided tree object.Return the Class of the Generic T, so that it can be used in an "instanceof" style check.Create a new mutable Map or List, suitable for this PathElement to traverse.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 com.bazaarvoice.jolt.traversr.traversal.BaseTraversalStep
getChild, traverse
-
Constructor Details
-
ArrayTraversalStep
-
-
Method Details
-
getStepType
Description copied from interface:TraversalStep
Return the Class of the Generic T, so that it can be used in an "instanceof" style check.- Returns:
- Class that matches Generic parameter T
-
newContainer
Description copied from interface:TraversalStep
Create a new mutable Map or List, suitable for this PathElement to traverse.- Returns:
- new List or Map, depending on the type of the Traversal
-
get
Description copied from interface:TraversalStep
Return the data for the key from the provided tree object.- Returns:
- data object if available, or null.
-
remove
Description copied from interface:TraversalStep
Remove and return the data for the key from the provided tree object.- Returns:
- data object if available, or null.
-
overwriteSet
Description copied from interface:TraversalStep
Insert the data into the tree, overwriting any data that is there.- Returns:
- returns the data object if successful or null if it could not
-
ensureArraySize
-