Enum Class DataTypeFilter

java.lang.Object
java.lang.Enum<DataTypeFilter>
net.luckperms.api.query.dataorder.DataTypeFilter
All Implemented Interfaces:
Serializable, Comparable<DataTypeFilter>, java.lang.constant.Constable, Predicate<DataType>

public enum DataTypeFilter extends Enum<DataTypeFilter> implements Predicate<DataType>
Represents which different DataTypes are used for a query.

The DataTypeFilter enum simply represents some default implementations of the Predicate required by QueryOptions and the values(Predicate) method.

Users are free to implement their own predicate. However, be aware that it is possible that more DataTypes may be added in the future. Ideally the Predicate implementations should be able to handle these smoothly.

Since:
5.2
See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static DataTypeFilter[] 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 DataTypeFilter 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
    • values

      public static @NonNull List<DataType> values(@NonNull Predicate<? super DataType> predicate)
      Gets a List of all DataTypes, filtered by the predicate.
      Parameters:
      predicate - the predicate to filter with
      Returns:
      the list of data types