Enum RegexpFlag

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<RegexpFlag>, java.lang.constant.Constable

    public enum RegexpFlag
    extends java.lang.Enum<RegexpFlag>
    Regular expression syntax flags. Each flag represents optional syntax support in the regular expression:
    • INTERSECTION - Support for intersection notation: &lt;expression&gt; &amp; &lt;expression&gt;
    • COMPLEMENT - Support for complement notation: &lt;expression&gt; &amp; &lt;expression&gt;
    • EMPTY - Support for the empty language symbol: #
    • ANYSTRING - Support for the any string symbol: @
    • INTERVAL - Support for numerical interval notation: &lt;n-m&gt;
    • NONE - Disable support for all syntax options
    • ALL - Enables support for all syntax options
    See Also:
    RegexpQueryBuilder.flags(RegexpFlag...), RegexpQueryBuilder.flags(RegexpFlag...)
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Enum

        java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ALL
      Enables all available option flags
      ANYSTRING
      Enables any string expression: @
      COMPLEMENT
      Enables complement expression of the form: ~&lt;expression&gt;
      EMPTY
      Enables empty language expression: #
      INTERSECTION
      Enables intersection of the form: &lt;expression&gt; &amp; &lt;expression&gt;
      INTERVAL
      Enables numerical interval expression: &lt;n-m&gt;
      NONE
      Disables all available option flags
    • Method Summary

      Modifier and Type Method Description
      static int resolveValue​(java.lang.String flags)
      Resolves the combined OR'ed value for the given list of regular expression flags.
      int value()  
      static RegexpFlag valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static RegexpFlag[] 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, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

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

      • INTERSECTION

        public static final RegexpFlag INTERSECTION
        Enables intersection of the form: &lt;expression&gt; &amp; &lt;expression&gt;
      • COMPLEMENT

        public static final RegexpFlag COMPLEMENT
        Enables complement expression of the form: ~&lt;expression&gt;
      • EMPTY

        public static final RegexpFlag EMPTY
        Enables empty language expression: #
      • ANYSTRING

        public static final RegexpFlag ANYSTRING
        Enables any string expression: @
      • INTERVAL

        public static final RegexpFlag INTERVAL
        Enables numerical interval expression: &lt;n-m&gt;
      • NONE

        public static final RegexpFlag NONE
        Disables all available option flags
      • ALL

        public static final RegexpFlag ALL
        Enables all available option flags
    • Method Detail

      • values

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

        public static RegexpFlag 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
      • value

        public int value()
      • resolveValue

        public static int resolveValue​(java.lang.String flags)
        Resolves the combined OR'ed value for the given list of regular expression flags. The given flags must follow the following syntax:

        flag_name(|flag_name)*

        Where flag_name is one of the following:

        • INTERSECTION
        • COMPLEMENT
        • EMPTY
        • ANYSTRING
        • INTERVAL
        • NONE
        • ALL

        Example: INTERSECTION|COMPLEMENT|EMPTY

        Parameters:
        flags - A string representing a list of regular expression flags
        Returns:
        The combined OR'ed value for all the flags