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.intintgetSubKeyRef(int index) voidHere be mutability...Methods inherited from class BasePathElement
getRawKey, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface PathElement
getRawKey
-
Field Details
-
subKeys
-
hashCount
private int hashCount
-
-
Constructor Details
-
MatchedElement
-
MatchedElement
-
-
Method Details
-
evaluate
Description copied from interface:EvaluatablePathElementEvaluate this key as if it is an write path element.- Specified by:
evaluatein 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:PathElementGet 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:
getCanonicalFormin interfacePathElement- Returns:
- canonical String version of this PathElement
-
getSubKeyRef
-
getSubKeyCount
public int getSubKeyCount() -
getHashCount
public int getHashCount() -
incrementHashCount
public void incrementHashCount()Here be mutability...
-