Uses of Class
com.bazaarvoice.jolt.common.Optional
Packages that use Optional
Package
Description
-
Uses of Optional in com.bazaarvoice.jolt.cardinality
Methods in com.bazaarvoice.jolt.cardinality with parameters of type Optional -
Uses of Optional in com.bazaarvoice.jolt.common
Fields in com.bazaarvoice.jolt.common declared as OptionalMethods in com.bazaarvoice.jolt.common that return OptionalModifier and TypeMethodDescriptionstatic <T> Optional
<T> Optional.empty()
static <T> Optional
<T> Optional.of
(T value) PathEvaluatingTraversal.read
(Object data, WalkedPath walkedPath) Methods in com.bazaarvoice.jolt.common with parameters of type OptionalModifier and TypeMethodDescriptionprivate static <T extends BaseSpec>
voidExecutionStrategy.applyKeyToComputed
(List<T> computedChildren, WalkedPath walkedPath, Map<String, Object> output, String subKeyStr, Optional<Object> subInputOptional, Map<String, Object> context) private static <T extends OrderedCompositeSpec>
voidExecutionStrategy.applyKeyToLiteralAndComputed
(T spec, String subKeyStr, Optional<Object> subInputOptional, WalkedPath walkedPath, Map<String, Object> output, Map<String, Object> context) This is the method we are trying to avoid calling.void
ExecutionStrategy.process
(OrderedCompositeSpec spec, Optional<Object> inputOptional, WalkedPath walkedPath, Map<String, Object> output, Map<String, Object> context) -
Uses of Optional in com.bazaarvoice.jolt.common.pathelement
Methods in com.bazaarvoice.jolt.common.pathelement that return OptionalModifier and TypeMethodDescriptionTransposePathElement.objectEvaluate
(WalkedPath walkedPath) This method is used when the TransposePathElement is used on the LFH as data. -
Uses of Optional in com.bazaarvoice.jolt.common.spec
Methods in com.bazaarvoice.jolt.common.spec with parameters of type Optional -
Uses of Optional in com.bazaarvoice.jolt.common.tree
Fields in com.bazaarvoice.jolt.common.tree declared as OptionalMethods in com.bazaarvoice.jolt.common.tree that return Optional -
Uses of Optional in com.bazaarvoice.jolt.modifier.function
Fields in com.bazaarvoice.jolt.modifier.function declared as OptionalMethods in com.bazaarvoice.jolt.modifier.function that return OptionalModifier and TypeMethodDescriptionGiven any object, returns, if possible.Deprecated.protected Optional
protected Optional
protected Optional
Function.ArgDrivenFunction.applySingle
(SOURCE specialArg, Object arg) Function.ArgDrivenListFunction.applySingle
(S specialArg, Object arg) Function.ArgDrivenSingleFunction.applySingle
(S specialArg, Object arg) Function.BaseFunction.applySingle
(Object arg) Function.ListFunction.applySingle
(Object arg) Function.SingleFunction.applySingle
(Object arg) Function.SquashFunction.applySingle
(Object arg) protected Optional
Lists.sort.applySingle
(Object arg) Lists.toList.applySingle
(Object arg) Math.abs.applySingle
(Object arg) Math.max.applySingle
(Object arg) Math.min.applySingle
(Object arg) Objects.recursivelySquashNulls.applySingle
(Object arg) Objects.squashNulls.applySingle
(Object arg) Objects.toBoolean.applySingle
(Object arg) Objects.toDouble.applySingle
(Object arg) Objects.toInteger.applySingle
(Object arg) Objects.toLong.applySingle
(Object arg) Objects.toString.applySingle
(Object arg) Strings.split.applySingle
(String separator, Object source) Strings.toLowerCase.applySingle
(Object arg) Strings.toUpperCase.applySingle
(Object arg) Strings.trim.applySingle
(Object arg) 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)Math.divideAndRound
(List<Object> argList, int digitsAfterDecimalPoint) Math.doubleSubtract
(List<Object> argList) FunctionEvaluator.evaluate
(Optional<Object> inputOptional, WalkedPath walkedPath, Map<String, Object> context) FunctionArg.ContextLookupArg.evaluateArg
(WalkedPath walkedPath, Map<String, Object> context) FunctionArg.evaluateArg
(WalkedPath walkedPath, Map<String, Object> context) FunctionArg.LiteralArg.evaluateArg
(WalkedPath walkedPath, Map<String, Object> context) FunctionArg.SelfLookupArg.evaluateArg
(WalkedPath walkedPath, Map<String, Object> context) Function.ArgDrivenFunction.getSpecialArg
(Object[] args) Math.intSubtract
(List<Object> argList) Math.longSubtract
(List<Object> argList) 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()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()Returns boolean value of argument, if possible, wrapped in Optional Interprets Strings "true" invalid input: '&' "false" as booleanReturns double value of argument, if possible, wrapped in Optional Interprets String as NumberReturns int value of argument, if possible, wrapped in Optional Interprets String as NumberReturns long value of argument, if possible, wrapped in Optional Interprets String as NumberGiven any object, returns, if possible.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()Methods in com.bazaarvoice.jolt.modifier.function with parameters of type Optional -
Uses of Optional in com.bazaarvoice.jolt.modifier.spec
Methods in com.bazaarvoice.jolt.modifier.spec that return OptionalModifier and TypeMethodDescriptionModifierLeafSpec.getFirstAvailable
(List<FunctionEvaluator> functionEvaluatorList, Optional<Object> inputOptional, WalkedPath walkedPath, Map<String, Object> context) Methods in com.bazaarvoice.jolt.modifier.spec with parameters of type OptionalModifier and TypeMethodDescriptionboolean
ModifierSpec.apply
(String inputKey, Optional<Object> inputOptional, WalkedPath walkedPath, Map<String, Object> output, Map<String, Object> context) void
ModifierCompositeSpec.applyElement
(String inputKey, Optional<Object> inputOptional, MatchedElement thisLevel, WalkedPath walkedPath, 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 debuggingModifierLeafSpec.getFirstAvailable
(List<FunctionEvaluator> functionEvaluatorList, Optional<Object> inputOptional, WalkedPath walkedPath, Map<String, Object> context) -
Uses of Optional in com.bazaarvoice.jolt.shiftr
Methods in com.bazaarvoice.jolt.shiftr that return OptionalModifier and TypeMethodDescriptionShiftrTraversr.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. -
Uses of Optional in com.bazaarvoice.jolt.shiftr.spec
Methods in com.bazaarvoice.jolt.shiftr.spec with parameters of type OptionalModifier and TypeMethodDescriptionboolean
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.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. -
Uses of Optional in com.bazaarvoice.jolt.traversr
Methods in com.bazaarvoice.jolt.traversr that return OptionalModifier and TypeMethodDescriptionNote : Calling this method MAY modify the tree object by adding new Maps and Lists as needed for the traversal.SimpleTraversr.handleFinalSet
(TraversalStep traversalStep, Object tree, String key, DataType data) 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.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".Traversr.handleIntermediateGet
(TraversalStep traversalStep, Object tree, String key, TraversalStep.Operation op) Allow subclasses to control how gets are handled for intermediate traversals.Note : Calling this method MAY modify the tree object by adding new Maps and Lists as needed for the traversal. -
Uses of Optional in com.bazaarvoice.jolt.traversr.traversal
Methods in com.bazaarvoice.jolt.traversr.traversal that return OptionalModifier and TypeMethodDescriptionReturn the data for the key from the provided tree object.ArrayTraversalStep.overwriteSet
(List<Object> list, String key, DataType data) AutoExpandArrayTraversalStep.overwriteSet
(List<Object> list, String key, DataType data) TraversalStep.overwriteSet
(StepType tree, String key, DataType data) Insert the data into the tree, overwriting any data that is there.Remove and return the data for the key from the provided tree object.BaseTraversalStep.traverse
(StepType tree, TraversalStep.Operation op, Iterator<String> keys, DataType data) TraversalStep.traverse
(StepType tree, TraversalStep.Operation op, Iterator<String> keys, DataType data) The meat of the Traversal.