Package com.bazaarvoice.jolt.removr.spec
Class RemovrSpec
- java.lang.Object
-
- com.bazaarvoice.jolt.removr.spec.RemovrSpec
-
- Direct Known Subclasses:
RemovrCompositeSpec
,RemovrLeafSpec
public abstract class RemovrSpec extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected MatchablePathElement
pathElement
-
Constructor Summary
Constructors Constructor Description RemovrSpec(java.lang.String rawJsonKey)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.List<java.lang.Integer>
applyToList(java.util.List<java.lang.Object> inputList)
Build a list of indices to remove from the input list, using the pathElement from the Spec.abstract java.util.List<java.lang.String>
applyToMap(java.util.Map<java.lang.String,java.lang.Object> inputMap)
Build a list of keys to remove from the input map, using the pathElement from the Spec.protected java.lang.Integer
getNonNegativeIntegerFromLiteralPathElement()
Try to "interpret" the spec String value as a non-negative integer.static PathElement
parse(java.lang.String key)
-
-
-
Field Detail
-
pathElement
protected final MatchablePathElement pathElement
-
-
Method Detail
-
parse
public static PathElement parse(java.lang.String key)
-
getNonNegativeIntegerFromLiteralPathElement
protected java.lang.Integer getNonNegativeIntegerFromLiteralPathElement()
Try to "interpret" the spec String value as a non-negative integer.- Returns:
- non-negative integer, otherwise null
-
applyToList
public abstract java.util.List<java.lang.Integer> applyToList(java.util.List<java.lang.Object> inputList)
Build a list of indices to remove from the input list, using the pathElement from the Spec.- Returns:
- the indicies to remove, otherwise empty List.
-
applyToMap
public abstract java.util.List<java.lang.String> applyToMap(java.util.Map<java.lang.String,java.lang.Object> inputMap)
Build a list of keys to remove from the input map, using the pathElement from the Spec.- Returns:
- the keys to remove, otherwise empty List.
-
-