Interface BaseSpec

All Known Subinterfaces:
OrderedCompositeSpec
All Known Implementing Classes:
CardinalityCompositeSpec, CardinalityLeafSpec, CardinalitySpec, ModifierCompositeSpec, ModifierLeafSpec, ModifierSpec, ShiftrCompositeSpec, ShiftrLeafSpec, ShiftrSpec

public interface BaseSpec
BaseSpec interface that provide a way to get its own pathElement and an apply(...) method to process the spec using input, output and context
  • Method Details

    • getPathElement

      MatchablePathElement getPathElement()
      Gimme the LHS path element
      Returns:
      LHS path element for comparison
    • apply

      boolean 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. It should return true if this Spec object was able to successfully apply itself given the inputKey and input object. In the context of the Shiftr parallel treewalk, if this method returns true, the assumption is that no other sibling Shiftr specs need to look at this particular input key.
      Returns:
      true if this this spec "handles" the inputkey such that no sibling specs need to see it