Enum Class Predicates

java.lang.Object
java.lang.Enum<Predicates>
org.elasticsearch.core.Predicates
All Implemented Interfaces:
Serializable, Comparable<Predicates>, Constable

public enum Predicates extends Enum<Predicates>
Utilities around predicates.
  • Method Details

    • values

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

      public static Predicates valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • always

      public static <T> Predicate<T> always()
      Type Parameters:
      T - type of the predicate
      Returns:
      a predicate that accepts all input values
    • never

      public static <T> Predicate<T> never()
      Type Parameters:
      T - type of the predicate
      Returns:
      a predicate that rejects all input values
    • once

      public static BooleanSupplier once()
      Returns:
      a BooleanSupplier which supplies true the first time it is called, and false subsequently.