Class Condition.Sequence.Element

  • Enclosing class:
    Condition.Sequence

    public static final class Condition.Sequence.Element
    extends Object
    One pattern element: a matcher evaluated against an instruction, repeated [min,max] times.
    • Constructor Detail

      • Element

        public Element​(Condition matcher,
                       int min,
                       int max)
        Creates a pattern element with explicit repetition bounds.
        Parameters:
        matcher - the condition each matched instruction must satisfy
        min - the fewest consecutive matches accepted
        max - the most consecutive matches accepted, UNBOUNDED for no limit
    • Method Detail

      • matcher

        public Condition matcher()
        Returns:
        the per-instruction matcher condition
      • min

        public int min()
        Returns:
        the minimum repetition count
      • max

        public int max()
        Returns:
        the maximum repetition count, UNBOUNDED for no limit
      • gap

        public static Condition.Sequence.Element gap()
        Creates the gap element that matches any run of instructions.
        Returns:
        an element matching zero or more arbitrary instructions