Package com.bazaarvoice.jolt.common.tree
Class MatchedElement
java.lang.Object
com.bazaarvoice.jolt.common.pathelement.BasePathElement
com.bazaarvoice.jolt.common.tree.MatchedElement
- All Implemented Interfaces:
EvaluatablePathElement
,PathElement
- Direct Known Subclasses:
ArrayMatchedElement
MatchedElement is the result of a "match" between a spec PathElement and some input data.
MatchedElements are not thread safe, and should instead be stack / single Thread/Transform specific.
This mutability was specifically added for the the HashCount functionality, which allows Shiftr
to transform data form maps to lists.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate
(WalkedPath walkedPath) Evaluate this key as if it is an write path element.Get the canonical form of this PathElement.int
int
getSubKeyRef
(int index) void
Here be mutability...Methods inherited from class com.bazaarvoice.jolt.common.pathelement.BasePathElement
getRawKey, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.bazaarvoice.jolt.common.pathelement.PathElement
getRawKey
-
Field Details
-
subKeys
-
hashCount
private int hashCount
-
-
Constructor Details
-
MatchedElement
-
MatchedElement
-
-
Method Details
-
evaluate
Description copied from interface:EvaluatablePathElement
Evaluate this key as if it is an write path element.- Specified by:
evaluate
in interfaceEvaluatablePathElement
- Parameters:
walkedPath
- "up the tree" list of LiteralPathElements, that may be used by this key as it is computing- Returns:
- String path element to use for write tree building
-
getCanonicalForm
Description copied from interface:PathElement
Get the canonical form of this PathElement. Really only interesting for the Reference Path element, where it will expand "invalid input: '&'" to "invalid input: '&'0(0)".- Specified by:
getCanonicalForm
in interfacePathElement
- Returns:
- canonical String version of this PathElement
-
getSubKeyRef
-
getSubKeyCount
public int getSubKeyCount() -
getHashCount
public int getHashCount() -
incrementHashCount
public void incrementHashCount()Here be mutability...
-