org.apache.lucene.sandbox.queries.regex

## Class JavaUtilRegexCapabilities

- java.lang.Object
- - org.apache.lucene.sandbox.queries.regex.JavaUtilRegexCapabilities

- All Implemented Interfaces:
    RegexCapabilities

  Deprecated.
  Use core's regex query.

      @Deprecated
      public class JavaUtilRegexCapabilities
      extends Object
      implements RegexCapabilities

  An implementation tying Java's built-in java.util.regex to RegexQuery. Note that because this implementation currently only returns null from `RegexCapabilities.RegexMatcher.prefix()` that queries using this implementation will enumerate and attempt to `RegexCapabilities.RegexMatcher.match(BytesRef)` each term for the specified field in the index.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.lucene.sandbox.queries.regex.RegexCapabilities

      `RegexCapabilities.RegexMatcher`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `FLAG_CANON_EQ` Deprecated.
    `static int` | `FLAG_CASE_INSENSITIVE` Deprecated.
    `static int` | `FLAG_COMMENTS` Deprecated.
    `static int` | `FLAG_DOTALL` Deprecated.
    `static int` | `FLAG_LITERAL` Deprecated.
    `static int` | `FLAG_MULTILINE` Deprecated.
    `static int` | `FLAG_UNICODE_CASE` Deprecated.
    `static int` | `FLAG_UNIX_LINES` Deprecated.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JavaUtilRegexCapabilities()` Deprecated. Default constructor that uses java.util.regex.Pattern with its default flags.
    `JavaUtilRegexCapabilities(int flags)` Deprecated. Constructor that allows for the modification of the flags that the java.util.regex.Pattern will use to compile the regular expression.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `RegexCapabilities.RegexMatcher` | `compile(String regex)` Deprecated. Called by the constructor of `RegexTermsEnum` allowing implementations to cache a compiled version of the regular expression pattern.
    `boolean` | `equals(Object obj)` Deprecated.
    `int` | `hashCode()` Deprecated.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### FLAG_CANON_EQ

          public static final int FLAG_CANON_EQ

      Deprecated.
      See Also:
        Constant Field Values

    - #### FLAG_CASE_INSENSITIVE

          public static final int FLAG_CASE_INSENSITIVE

      Deprecated.
      See Also:
        Constant Field Values

    - #### FLAG_COMMENTS

          public static final int FLAG_COMMENTS

      Deprecated.
      See Also:
        Constant Field Values

    - #### FLAG_DOTALL

          public static final int FLAG_DOTALL

      Deprecated.
      See Also:
        Constant Field Values

    - #### FLAG_LITERAL

          public static final int FLAG_LITERAL

      Deprecated.
      See Also:
        Constant Field Values

    - #### FLAG_MULTILINE

          public static final int FLAG_MULTILINE

      Deprecated.
      See Also:
        Constant Field Values

    - #### FLAG_UNICODE_CASE

          public static final int FLAG_UNICODE_CASE

      Deprecated.
      See Also:
        Constant Field Values

    - #### FLAG_UNIX_LINES

          public static final int FLAG_UNIX_LINES

      Deprecated.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### JavaUtilRegexCapabilities

          public JavaUtilRegexCapabilities()

      Deprecated.
      Default constructor that uses java.util.regex.Pattern with its default flags.

    - #### JavaUtilRegexCapabilities

          public JavaUtilRegexCapabilities(int flags)

      Deprecated.
      Constructor that allows for the modification of the flags that the java.util.regex.Pattern will use to compile the regular expression. This gives the user the ability to fine-tune how the regular expression to match the functionality that they need. The `Pattern` class supports specifying these fields via the regular expression text itself, but this gives the caller another option to modify the behavior. Useful in cases where the regular expression text cannot be modified, or if doing so is undesired.
      Parameters:
        `flags` - The flags that are ORed together.

  - ### Method Detail

    - #### compile

          public RegexCapabilities.RegexMatcher compile(String regex)

      Deprecated.
      Description copied from interface: `RegexCapabilities`
      Called by the constructor of `RegexTermsEnum` allowing implementations to cache a compiled version of the regular expression pattern.
      Specified by:
        `compile` in interface `RegexCapabilities`
      Parameters:
        `regex` - regular expression pattern

    - #### hashCode

          public int hashCode()

      Deprecated.
      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Deprecated.
      Overrides:
        `equals` in class `Object`

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.