org.apache.commons.text

## Enum CharacterPredicates

- java.lang.Object
- - java.lang.Enum<CharacterPredicates>
  - - org.apache.commons.text.CharacterPredicates

- All Implemented Interfaces:
    Serializable, Comparable<CharacterPredicates>, CharacterPredicate

      public enum CharacterPredicates
      extends Enum<CharacterPredicates>
      implements CharacterPredicate

  Commonly used implementations of `CharacterPredicate`. Per the interface requirements, all implementations are thread safe.

  Since:
    1.0

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `DIGITS` Tests code points against `Character.isDigit(int)`.
    `LETTERS` Tests code points against `Character.isLetter(int)`.

  - ### Method Summary

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

    - ### Methods inherited from interface org.apache.commons.text.CharacterPredicate

      `test`

- - ### Enum Constant Detail

    - #### LETTERS

          public static final CharacterPredicates LETTERS

      Tests code points against `Character.isLetter(int)`.
      Since:
        1.0

    - #### DIGITS

          public static final CharacterPredicates DIGITS

      Tests code points against `Character.isDigit(int)`.
      Since:
        1.0

  - ### Method Detail

    - #### values

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

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

    - #### valueOf

          public static CharacterPredicates 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

Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.