public abstract class ShiftrSpec extends Object
Modifier and Type | Field and Description |
---|---|
protected MatchablePathElement |
pathElement |
Constructor and Description |
---|
ShiftrSpec(String rawJsonKey) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
apply(String inputKey,
Object input,
WalkedPath walkedPath,
Map<String,Object> output)
This is the main recursive method of the Shiftr parallel "spec" and "input" tree walk.
|
static List<String> |
parseDotNotation(List<String> pathStrings,
Iterator<Character> iter,
String dotNotationRef)
Method that recursively parses a dotNotation String based on an iterator.
|
static List<PathElement> |
parseDotNotationRHS(String dotNotation)
Parse the dotNotation of the RHS.
|
static PathElement |
parseSingleKeyLHS(String key)
Visible for Testing.
|
static Iterator<Character> |
stringIterator(String string)
Helper method to turn a String into an Iterator
|
protected final MatchablePathElement pathElement
public ShiftrSpec(String rawJsonKey)
public static PathElement parseSingleKeyLHS(String key)
key
- String that should represent a single PathElementpublic static Iterator<Character> stringIterator(String string)
public static List<String> parseDotNotation(List<String> pathStrings, Iterator<Character> iter, String dotNotationRef)
pathStrings
- List to store parsed Strings that each represent a PathElementiter
- the iterator to pull characters fromdotNotationRef
- the original dotNotation string used for error messagespublic static List<PathElement> parseDotNotationRHS(String dotNotation)
public abstract boolean apply(String inputKey, Object input, WalkedPath walkedPath, Map<String,Object> output)
Copyright © 2016. All Rights Reserved.