Enum Class FSAFlags

java.lang.Object
java.lang.Enum<FSAFlags>
morfologik.fsa.FSAFlags
All Implemented Interfaces:
Serializable, Comparable<FSAFlags>, Constable

public enum FSAFlags extends Enum<FSAFlags>
FSA automaton flags. Where applicable, flags follow Daciuk's fsa package.
  • Enum Constant Details

    • FLEXIBLE

      public static final FSAFlags FLEXIBLE
      Daciuk: flexible FSA encoding.
    • STOPBIT

      public static final FSAFlags STOPBIT
      Daciuk: stop bit in use.
    • NEXTBIT

      public static final FSAFlags NEXTBIT
      Daciuk: next bit in use.
    • TAILS

      public static final FSAFlags TAILS
      Daciuk: tails compression.
    • NUMBERS

      public static final FSAFlags NUMBERS
      The FSA contains right-language count numbers on states.
      See Also:
    • SEPARATORS

      public static final FSAFlags SEPARATORS
      The FSA supports legacy built-in separator and filler characters (Daciuk's FSA package compatibility).
  • Field Details

    • bits

      public final int bits
      Bit mask for the corresponding flag.
  • Constructor Details

    • FSAFlags

      private FSAFlags(int bits)
  • Method Details

    • values

      public static FSAFlags[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FSAFlags valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isSet

      public boolean isSet(int flags)
      Parameters:
      flags - The bitset with flags.
      Returns:
      Returns true iff this flag is set in flags.
    • asShort

      public static short asShort(Set<FSAFlags> flags)
      Parameters:
      flags - A set of flags to encode.
      Returns:
      Returns the set of flags encoded as packed short.