Class StarAllPathElement
- java.lang.Object
-
- com.bazaarvoice.jolt.common.pathelement.StarAllPathElement
-
- All Implemented Interfaces:
MatchablePathElement
,PathElement
,StarPathElement
public class StarAllPathElement extends java.lang.Object implements StarPathElement
PathElement for the lone "*" wildcard. In this case we can avoid doing any regex or string comparison work at all.
-
-
Constructor Summary
Constructors Constructor Description StarAllPathElement(java.lang.String key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCanonicalForm()
Get the canonical form of this PathElement.java.lang.String
getRawKey()
MatchedElement
match(java.lang.String dataKey, WalkedPath walkedPath)
See if this PathElement matches the given dataKey.boolean
stringMatch(java.lang.String literal)
Method to see if a candidate key would match this PathElement.
-
-
-
Method Detail
-
stringMatch
public boolean stringMatch(java.lang.String literal)
Description copied from interface:StarPathElement
Method to see if a candidate key would match this PathElement.- Specified by:
stringMatch
in interfaceStarPathElement
- Parameters:
literal
- test to see if the provided string will match this Element's regex- Returns:
- true if the provided literal will match this Element's regex
-
match
public MatchedElement match(java.lang.String dataKey, WalkedPath walkedPath)
Description copied from interface:MatchablePathElement
See if this PathElement matches the given dataKey. If it does not match, this method returns null. If this PathElement does match, it returns a LiteralPathElement with subKeys filled in.- Specified by:
match
in interfaceMatchablePathElement
- Parameters:
dataKey
- String key value from the input datawalkedPath
- "up the tree" list of LiteralPathElements, that may be used by this key as it is computing its match- Returns:
- null or a matched LiteralPathElement
-
getCanonicalForm
public java.lang.String 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 "&" to "&0(0)".- Specified by:
getCanonicalForm
in interfacePathElement
- Returns:
- canonical String version of this PathElement
-
getRawKey
public java.lang.String getRawKey()
- Specified by:
getRawKey
in interfacePathElement
-
-