Enum Pattern.Op

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Pattern.Op>
    Enclosing interface:
    Pattern

    public static enum Pattern.Op
    extends java.lang.Enum<Pattern.Op>
    Operator that constructs composite Pattern instances.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ANCHOR_END
      Anchor for end "$"
      ANCHOR_START
      Anchor for start "^"
      OPTIONAL
      Pattern that machtes a pattern one time or zero times
      OR
      Pattern that matches one pattern or another.
      PLUS
      Pattern that matches a pattern repeated one or more times.
      REPEAT
      Pattern that matches a pattern repeated between minRepeat and maxRepeat times.
      SEQ
      Pattern that matches one pattern followed by another.
      STAR
      Pattern that matches a pattern repeated zero or more times.
      SYMBOL
      A leaf pattern, consisting of a single symbol.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int maxArity  
      private int minArity  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Op​(int minArity, int maxArity)  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Pattern.Op valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Pattern.Op[] 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

      • SYMBOL

        public static final Pattern.Op SYMBOL
        A leaf pattern, consisting of a single symbol.
      • ANCHOR_START

        public static final Pattern.Op ANCHOR_START
        Anchor for start "^"
      • ANCHOR_END

        public static final Pattern.Op ANCHOR_END
        Anchor for end "$"
      • SEQ

        public static final Pattern.Op SEQ
        Pattern that matches one pattern followed by another.
      • OR

        public static final Pattern.Op OR
        Pattern that matches one pattern or another.
      • STAR

        public static final Pattern.Op STAR
        Pattern that matches a pattern repeated zero or more times.
      • PLUS

        public static final Pattern.Op PLUS
        Pattern that matches a pattern repeated one or more times.
      • REPEAT

        public static final Pattern.Op REPEAT
        Pattern that matches a pattern repeated between minRepeat and maxRepeat times.
      • OPTIONAL

        public static final Pattern.Op OPTIONAL
        Pattern that machtes a pattern one time or zero times
    • Field Detail

      • minArity

        private final int minArity
      • maxArity

        private final int maxArity
    • Constructor Detail

      • Op

        private Op​(int minArity,
                   int maxArity)
    • Method Detail

      • values

        public static Pattern.Op[] 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 (Pattern.Op c : Pattern.Op.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Pattern.Op 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