Package com.tonic.analysis.query.ast
Class Condition.Sequence.Element
- java.lang.Object
-
- com.tonic.analysis.query.ast.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.
-
-
Field Summary
Fields Modifier and Type Field Description static intUNBOUNDED
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Condition.Sequence.Elementgap()Creates the gap element that matches any run of instructions.Conditionmatcher()intmax()intmin()StringtoString()
-
-
-
Field Detail
-
UNBOUNDED
public static final int UNBOUNDED
- See Also:
- Constant Field Values
-
-
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 satisfymin- the fewest consecutive matches acceptedmax- 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
-
-