org.crosswire.jsword.index.search

## Enum SearchType

- java.lang.Object
- - java.lang.Enum<SearchType>
  - - org.crosswire.jsword.index.search.SearchType

- All Implemented Interfaces:
    Serializable, Comparable<SearchType>

      public enum SearchType
      extends Enum<SearchType>

  An Enumeration of the possible types of Searches.
  Author:
    DM Smith
  See Also:
    `The GNU Lesser General Public License for details.`

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ALL_WORDS` Find all the words regardless of position.
    `ANY_WORDS` Find any of these words
    `NOT_WORDS` Find verses not containing these words.
    `PHRASE` Find the words in the specified order.
    `RANGE` Find verses in this range
    `SPELL_WORDS` Find verses with words spelled something like
    `START_WORDS` Find verses with words that start with the these beginnings.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private String` | `name` The name of the BookCategory
    `protected static QueryDecorator` | `SEARCH_SYNTAX`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract String` | `decorate(String queryWords)` Decorate a string with the given type of decoration.
    `static SearchType` | `fromString(String name)` Lookup method to convert from a String
    `String` | `toString()`
    `static SearchType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static SearchType[]` | `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, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### PHRASE

          public static final SearchType PHRASE

      Find the words in the specified order.

    - #### ALL_WORDS

          public static final SearchType ALL_WORDS

      Find all the words regardless of position.

    - #### ANY_WORDS

          public static final SearchType ANY_WORDS

      Find any of these words

    - #### NOT_WORDS

          public static final SearchType NOT_WORDS

      Find verses not containing these words. Note this may require being added after words being sought.

    - #### START_WORDS

          public static final SearchType START_WORDS

      Find verses with words that start with the these beginnings.

    - #### SPELL_WORDS

          public static final SearchType SPELL_WORDS

      Find verses with words spelled something like

    - #### RANGE

          public static final SearchType RANGE

      Find verses in this range

  - ### Field Detail

    - #### name

          private String name

      The name of the BookCategory

    - #### SEARCH_SYNTAX

          protected static final QueryDecorator SEARCH_SYNTAX

  - ### Method Detail

    - #### values

          public static SearchType[] 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 (SearchType c : SearchType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static SearchType valueOf(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:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### decorate

          public abstract String decorate(String queryWords)

      Decorate a string with the given type of decoration.
      Parameters:
        `queryWords` -
      Returns:
        the decorated query

    - #### fromString

          public static SearchType fromString(String name)

      Lookup method to convert from a String
      Parameters:
        `name` -
      Returns:
        the matching search type

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Enum<SearchType>`