Class BasicAutomata
- java.lang.Object
-
- org.apache.pinot.segment.local.utils.nativefst.automaton.BasicAutomata
-
public final class BasicAutomata extends Object
Construction of basic automata.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AutomatonmakeAnyChar()Returns a new (deterministic) automaton that accepts any single character.static AutomatonmakeAnyString()Returns a new (deterministic) automaton that accepts all strings.static AutomatonmakeChar(char c)Returns a new (deterministic) automaton that accepts a single character of the given value.static AutomatonmakeCharRange(char min, char max)Returns a new (deterministic) automaton that accepts a single char whose value is in the given interval (including both end points).static AutomatonmakeEmpty()Returns a new (deterministic) automaton with the empty language.static AutomatonmakeEmptyString()Returns a new (deterministic) automaton that accepts only the empty string.static AutomatonmakeInterval(int min, int max, int digits)Returns a new automaton that accepts strings representing decimal non-negative integers in the given interval.static AutomatonmakeString(String s)Returns a new (deterministic) automaton that accepts the single given string.
-
-
-
Method Detail
-
makeEmpty
public static Automaton makeEmpty()
Returns a new (deterministic) automaton with the empty language.
-
makeEmptyString
public static Automaton makeEmptyString()
Returns a new (deterministic) automaton that accepts only the empty string.
-
makeAnyString
public static Automaton makeAnyString()
Returns a new (deterministic) automaton that accepts all strings.
-
makeAnyChar
public static Automaton makeAnyChar()
Returns a new (deterministic) automaton that accepts any single character.
-
makeChar
public static Automaton makeChar(char c)
Returns a new (deterministic) automaton that accepts a single character of the given value.
-
makeCharRange
public static Automaton makeCharRange(char min, char max)
Returns a new (deterministic) automaton that accepts a single char whose value is in the given interval (including both end points).
-
makeInterval
public static Automaton makeInterval(int min, int max, int digits) throws IllegalArgumentException
Returns a new automaton that accepts strings representing decimal non-negative integers in the given interval.- Parameters:
min- minimal value of intervalmax- maximal value of inverval (both end points are included in the interval)digits- if >0, use fixed number of digits (strings must be prefixed by 0's to obtain the right length) - otherwise, the number of digits is not fixed- Throws:
IllegalArgumentException- if min>max or if numbers in the interval cannot be expressed with the given fixed number of digits
-
-