Interface RepeatableMatcher

All Superinterfaces:
Matchers, RootNode
All Known Subinterfaces:
PrimitiveMatcher
All Known Implementing Classes:
ConstantNode, ElementNode, ForEachNode, MapEntryNode, ParameterNode, StringNode

public interface RepeatableMatcher extends RootNode
Defines API of a repeatable matcher. It is kind of RootNode, where one RootNode may match 0, 1 or more `target` nodes.
  • Method Details

    • getMatchingStrategy

      Quantifier getMatchingStrategy()
      If two RepeatableMatchers in a list are matching the same element, then returned Quantifier defines how resolve this conflict
      Returns:
      Quantifier
    • isRepeatable

      default boolean isRepeatable()
      Returns:
      true if this matcher can be applied more then once in the same container of targets Note: even if false, it may be applied again to another container and to match EQUAL value
    • isMandatory

      default boolean isMandatory(ImmutableMap parameters)
      Parameters:
      parameters - matching parameters
      Returns:
      true if this ValueResolver MUST match with next target in the state defined by current `parameters`. false if match is optional
    • isTryNextMatch

      boolean isTryNextMatch(ImmutableMap parameters)
      Parameters:
      parameters - matching parameters
      Returns:
      true if this ValueResolver should be processed again to match next target in the state defined by current `parameters`.