| Modifier and Type | Method and Description |
|---|---|
boolean |
CardinalitySpec.apply(String inputKey,
Optional<Object> inputOptional,
WalkedPath walkedPath,
Map<String,Object> output,
Map<String,Object> context) |
| Modifier and Type | Method and Description |
|---|---|
static <T> Optional<T> |
Optional.empty() |
static <T> Optional<T> |
Optional.of(T value) |
Optional<Object> |
PathEvaluatingTraversal.read(Object data,
WalkedPath walkedPath) |
| Modifier and Type | Method and Description |
|---|---|
void |
ExecutionStrategy.process(OrderedCompositeSpec spec,
Optional<Object> inputOptional,
WalkedPath walkedPath,
Map<String,Object> output,
Map<String,Object> context) |
| Modifier and Type | Method and Description |
|---|---|
Optional<Object> |
TransposePathElement.objectEvaluate(WalkedPath walkedPath)
This method is used when the TransposePathElement is used on the LFH as data.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
BaseSpec.apply(String inputKey,
Optional<Object> inputOptional,
WalkedPath walkedPath,
Map<String,Object> output,
Map<String,Object> context)
This is the main recursive method of the Shiftr/Templatr/Cardinality parallel "spec" and "input" tree walk.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<Integer> |
PathStep.getOrigSize() |
| Modifier and Type | Method and Description |
|---|---|
static Optional<Number> |
Math.abs(Object arg)
Given any object, returns, if possible.
|
Optional<Object> |
Objects.size.apply(Object... args) |
Optional<Object> |
Function.apply(Object... args)
Deprecated.
|
Optional<Object> |
Function.BaseFunction.apply(Object... args) |
Optional<Object> |
Function.ArgDrivenFunction.apply(Object... args) |
Optional<Object> |
Function.SquashFunction.apply(Object... args) |
protected Optional<Object> |
Math.divideAndRound.applyList(Integer digitsAfterDecimalPoint,
List<Object> args) |
protected Optional<Object> |
Lists.elementAt.applyList(Integer specialArg,
List<Object> args) |
protected Optional<Object> |
Math.max.applyList(List argList) |
protected Optional |
Lists.firstElement.applyList(List argList) |
protected Optional |
Lists.lastElement.applyList(List argList) |
protected Optional<Object> |
Lists.toList.applyList(List input) |
protected Optional |
Lists.sort.applyList(List argList) |
protected Optional<Object> |
Strings.concat.applyList(List<Object> argList) |
protected Optional<Object> |
Strings.substring.applyList(List<Object> argList) |
protected Optional<Object> |
Math.min.applyList(List<Object> argList) |
protected Optional<Object> |
Math.divide.applyList(List<Object> argList) |
protected Optional<Object> |
Math.avg.applyList(List<Object> argList) |
protected Optional<Object> |
Math.intSum.applyList(List<Object> argIntList) |
protected Optional<Object> |
Math.doubleSum.applyList(List<Object> argDoubleList) |
protected Optional<Object> |
Math.longSum.applyList(List<Object> argLongList) |
protected Optional<Object> |
Math.intSubtract.applyList(List<Object> argIntList) |
protected Optional<Object> |
Math.doubleSubtract.applyList(List<Object> argDoubleList) |
protected Optional<Object> |
Math.longSubtract.applyList(List<Object> argLongList) |
protected abstract Optional<Object> |
Function.BaseFunction.applyList(List<Object> input) |
protected Optional<Object> |
Function.SingleFunction.applyList(List<Object> input) |
protected abstract Optional<Object> |
Function.ListFunction.applyList(List<Object> argList) |
protected Optional<Object> |
Function.ArgDrivenSingleFunction.applyList(S specialArg,
List<Object> input) |
protected abstract Optional<Object> |
Function.ArgDrivenListFunction.applyList(S specialArg,
List<Object> args) |
protected abstract Optional<Object> |
Function.ArgDrivenFunction.applyList(SOURCE specialArg,
List<Object> args) |
protected Optional<Object> |
Strings.join.applyList(String specialArg,
List<Object> args) |
protected Optional<Object> |
Strings.leftPad.applyList(String source,
List<Object> args) |
protected Optional<Object> |
Strings.rightPad.applyList(String source,
List<Object> args) |
protected Optional<String> |
Strings.toLowerCase.applySingle(Object arg) |
protected Optional<String> |
Strings.toUpperCase.applySingle(Object arg) |
protected Optional<String> |
Strings.trim.applySingle(Object arg) |
protected Optional<Integer> |
Objects.toInteger.applySingle(Object arg) |
protected Optional<Long> |
Objects.toLong.applySingle(Object arg) |
protected Optional<Double> |
Objects.toDouble.applySingle(Object arg) |
protected Optional<Boolean> |
Objects.toBoolean.applySingle(Object arg) |
protected Optional<String> |
Objects.toString.applySingle(Object arg) |
protected Optional<Object> |
Objects.squashNulls.applySingle(Object arg) |
protected Optional<Object> |
Objects.recursivelySquashNulls.applySingle(Object arg) |
protected Optional<Object> |
Objects.squashDuplicates.applySingle(Object arg) |
protected Optional<Object> |
Math.max.applySingle(Object arg) |
protected Optional<Object> |
Math.min.applySingle(Object arg) |
protected Optional<Number> |
Math.abs.applySingle(Object arg) |
protected Optional<List> |
Lists.toList.applySingle(Object arg) |
protected Optional |
Lists.sort.applySingle(Object arg) |
protected abstract Optional<T> |
Function.BaseFunction.applySingle(Object arg) |
protected abstract Optional<T> |
Function.SingleFunction.applySingle(Object arg) |
protected Optional<Object> |
Function.ListFunction.applySingle(Object arg) |
protected abstract Optional<T> |
Function.SquashFunction.applySingle(Object arg) |
protected abstract Optional<R> |
Function.ArgDrivenSingleFunction.applySingle(S specialArg,
Object arg) |
protected Optional<Object> |
Function.ArgDrivenListFunction.applySingle(S specialArg,
Object arg) |
protected abstract Optional<RETTYPE> |
Function.ArgDrivenFunction.applySingle(SOURCE specialArg,
Object arg) |
protected Optional<List> |
Strings.split.applySingle(String separator,
Object source) |
static Optional<Double> |
Math.avg(List<Object> args)
Given a list of numbers, returns their avg as double
any value in the list that is not a valid number is ignored
avg(2,"2","abc") == Optional.of(2.0)
|
static Optional<Double> |
Math.divide(List<Object> argList) |
static Optional<Double> |
Math.divideAndRound(List<Object> argList,
int digitsAfterDecimalPoint) |
static Optional<Double> |
Math.doubleSubtract(List<Object> argList) |
static Optional<Double> |
Math.doubleSum(List<Object> args) |
Optional<Object> |
FunctionEvaluator.evaluate(Optional<Object> inputOptional,
WalkedPath walkedPath,
Map<String,Object> context) |
abstract Optional<Object> |
FunctionArg.evaluateArg(WalkedPath walkedPath,
Map<String,Object> context) |
static Optional<Integer> |
Math.intSubtract(List<Object> argList) |
static Optional<Integer> |
Math.intSum(List<Object> args) |
static Optional<Long> |
Math.longSubtract(List<Object> argList) |
static Optional<Long> |
Math.longSum(List<Object> args) |
static Optional<Number> |
Math.max(List<Object> args)
Given a list of objects, returns the max value in its appropriate type
also, interprets String as Number and returns appropriately
max(1,2l,3d) == Optional.of(3d)
max(1,2l,"3.0") == Optional.of(3.0)
max("a", "b", "c") == Optional.empty()
max([]) == Optional.empty()
|
static Optional<Number> |
Math.min(List<Object> args)
Given a list of objects, returns the min value in its appropriate type
also, interprets String as Number and returns appropriately
min(1d,2l,3) == Optional.of(1d)
min("1.0",2l,d) == Optional.of(1.0)
min("a", "b", "c") == Optional.empty()
min([]) == Optional.empty()
|
static Optional<Object> |
Objects.squashDuplicates(Object input)
Squashes/Deletes duplicates in lists.
|
static Optional<Boolean> |
Objects.toBoolean(Object arg)
Returns boolean value of argument, if possible, wrapped in Optional
Interprets Strings "true" & "false" as boolean
|
static Optional<Double> |
Objects.toDouble(Object arg)
Returns double value of argument, if possible, wrapped in Optional
Interprets String as Number
|
static Optional<Integer> |
Objects.toInteger(Object arg)
Returns int value of argument, if possible, wrapped in Optional
Interprets String as Number
|
static Optional<Long> |
Objects.toLong(Object arg)
Returns long value of argument, if possible, wrapped in Optional
Interprets String as Number
|
static Optional<? extends Number> |
Objects.toNumber(Object arg)
Given any object, returns, if possible.
|
static Optional<String> |
Objects.toString(Object arg)
Returns String representation of argument, wrapped in Optional
for array argument, returns Arrays.toString()
for others, returns Objects.toString()
Note: this method does not return Optional.empty()
|
| Modifier and Type | Method and Description |
|---|---|
Optional<Object> |
FunctionEvaluator.evaluate(Optional<Object> inputOptional,
WalkedPath walkedPath,
Map<String,Object> context) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
ModifierSpec.apply(String inputKey,
Optional<Object> inputOptional,
WalkedPath walkedPath,
Map<String,Object> output,
Map<String,Object> context) |
void |
ModifierLeafSpec.applyElement(String inputKey,
Optional<Object> inputOptional,
MatchedElement thisLevel,
WalkedPath walkedPath,
Map<String,Object> context) |
protected abstract void |
ModifierSpec.applyElement(String key,
Optional<Object> inputOptional,
MatchedElement thisLevel,
WalkedPath walkedPath,
Map<String,Object> context)
Templatr specific override that is used in BaseSpec#apply(...)
The name is changed for easy identification during debugging
|
void |
ModifierCompositeSpec.applyElement(String inputKey,
Optional<Object> inputOptional,
MatchedElement thisLevel,
WalkedPath walkedPath,
Map<String,Object> context) |
| Modifier and Type | Method and Description |
|---|---|
Optional<DataType> |
ShiftrTraversr.handleFinalSet(TraversalStep traversalStep,
Object tree,
String key,
DataType data)
Do a Shift style insert :
1) if there is no data "there", then just set it
2) if there is already a list "there", just add the data to the list
3) if there something other than a list there, grab it and stuff it and the data into a list
and overwrite what is there with a list.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
ShiftrLeafSpec.apply(String inputKey,
Optional<Object> inputOptional,
WalkedPath walkedPath,
Map<String,Object> output,
Map<String,Object> context)
If this Spec matches the inputkey, then do the work of outputting data and return true.
|
boolean |
ShiftrCompositeSpec.apply(String inputKey,
Optional<Object> inputOptional,
WalkedPath walkedPath,
Map<String,Object> output,
Map<String,Object> context)
If this Spec matches the inputKey, then perform one step in the Shiftr parallel treewalk.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<DataType> |
SimpleTraversal.get(Object tree) |
Optional<DataType> |
Traversr.get(Object tree,
List<String> keys)
Note : Calling this method MAY modify the tree object by adding new Maps and Lists as needed
for the traversal.
|
Optional<DataType> |
SimpleTraversr.handleFinalSet(TraversalStep traversalStep,
Object tree,
String key,
DataType data) |
abstract Optional<DataType> |
Traversr.handleFinalSet(TraversalStep traversalStep,
Object tree,
String key,
DataType data)
Allow subclasses to control how "sets" are done, if/once the traversal has made it to the the last element.
|
Optional<DataType> |
SimpleTraversr.handleIntermediateGet(TraversalStep traversalStep,
Object tree,
String key,
TraversalStep.Operation op)
Only make a new instance of a container object for SET, if there is nothing "there".
|
abstract Optional<DataType> |
Traversr.handleIntermediateGet(TraversalStep traversalStep,
Object tree,
String key,
TraversalStep.Operation op)
Allow subclasses to control how gets are handled for intermediate traversals.
|
Optional<DataType> |
SimpleTraversal.remove(Object tree) |
Optional<DataType> |
Traversr.remove(Object tree,
List<String> keys)
Note : Calling this method MAY modify the tree object by adding new Maps and Lists as needed
for the traversal.
|
Optional<DataType> |
SimpleTraversal.set(Object tree,
DataType data) |
Optional<DataType> |
Traversr.set(Object tree,
List<String> keys,
DataType data) |
| Modifier and Type | Method and Description |
|---|---|
Optional<DataType> |
AutoExpandArrayTraversalStep.get(List<Object> list,
String key) |
Optional<DataType> |
ArrayTraversalStep.get(List<Object> list,
String key) |
Optional<DataType> |
MapTraversalStep.get(Map<String,Object> map,
String key) |
Optional<DataType> |
TraversalStep.get(StepType tree,
String key)
Return the data for the key from the provided tree object.
|
Optional<DataType> |
AutoExpandArrayTraversalStep.overwriteSet(List<Object> list,
String key,
DataType data) |
Optional<DataType> |
ArrayTraversalStep.overwriteSet(List<Object> list,
String key,
DataType data) |
Optional<DataType> |
MapTraversalStep.overwriteSet(Map<String,Object> map,
String key,
DataType data) |
Optional<DataType> |
TraversalStep.overwriteSet(StepType tree,
String key,
DataType data)
Insert the data into the tree, overwriting any data that is there.
|
Optional<DataType> |
AutoExpandArrayTraversalStep.remove(List<Object> list,
String key) |
Optional<DataType> |
ArrayTraversalStep.remove(List<Object> list,
String key) |
Optional<DataType> |
MapTraversalStep.remove(Map<String,Object> map,
String key) |
Optional<DataType> |
TraversalStep.remove(StepType tree,
String key)
Remove and return the data for the key from the provided tree object.
|
Optional<DataType> |
TraversalStep.traverse(StepType tree,
TraversalStep.Operation op,
Iterator<String> keys,
DataType data)
The meat of the Traversal.
|
Optional<DataType> |
BaseTraversalStep.traverse(StepType tree,
TraversalStep.Operation op,
Iterator<String> keys,
DataType data) |
Copyright © 2023. All rights reserved.