Enum FSAFlags

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<FSAFlags>

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

      Enum Constants 
      Enum Constant Description
      FLEXIBLE
      Daciuk: flexible FSA encoding.
      NEXTBIT
      Daciuk: next bit in use.
      NUMBERS
      The FSA contains right-language count numbers on states.
      SEPARATORS
      The FSA supports legacy built-in separator and filler characters (Daciuk's FSA package compatibility).
      STOPBIT
      Daciuk: stop bit in use.
      TAILS
      Daciuk: tails compression.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int bits
      Bit mask for the corresponding flag.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private FSAFlags​(int bits)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static short asShort​(java.util.Set<FSAFlags> flags)  
      boolean isSet​(int flags)  
      static FSAFlags valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static FSAFlags[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • 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.
      • SEPARATORS

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

      • bits

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

      • FSAFlags

        private FSAFlags​(int bits)
    • Method Detail

      • values

        public static FSAFlags[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (FSAFlags c : FSAFlags.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FSAFlags valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.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​(java.util.Set<FSAFlags> flags)
        Parameters:
        flags - A set of flags to encode.
        Returns:
        Returns the set of flags encoded as packed short.