Enum DataTypeFilter
- java.lang.Object
-
- java.lang.Enum<DataTypeFilter>
-
- net.luckperms.api.query.dataorder.DataTypeFilter
-
- All Implemented Interfaces:
Serializable,Comparable<DataTypeFilter>,Predicate<DataType>
public enum DataTypeFilter extends Enum<DataTypeFilter> implements Predicate<DataType>
Represents which differentDataTypes are used for a query.The
DataTypeFilterenum simply represents some default implementations of thePredicaterequired byQueryOptionsand thevalues(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 thePredicateimplementations should be able to handle these smoothly.- Since:
- 5.2
- See Also:
DataTypeFilterFunction
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLA data type filter indicating that allDataTypes should be used.NONEA data type filter indicating that noDataTypes should be used.NORMAL_ONLYA data type filter indicating that onlyDataType.NORMALshould be used.TRANSIENT_ONLYA data type filter indicating that onlyDataType.TRANSIENTshould be used.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DataTypeFiltervalueOf(String name)Returns the enum constant of this type with the specified name.static DataTypeFilter[]values()Returns an array containing the constants of this enum type, in the order they are declared.static @NonNull List<DataType>values(@NonNull Predicate<? super DataType> predicate)
-
-
-
Enum Constant Detail
-
ALL
public static final DataTypeFilter ALL
A data type filter indicating that allDataTypes should be used.
-
NONE
public static final DataTypeFilter NONE
A data type filter indicating that noDataTypes should be used.
-
NORMAL_ONLY
public static final DataTypeFilter NORMAL_ONLY
A data type filter indicating that onlyDataType.NORMALshould be used.
-
TRANSIENT_ONLY
public static final DataTypeFilter TRANSIENT_ONLY
A data type filter indicating that onlyDataType.TRANSIENTshould be used.
-
-
Method Detail
-
values
public static DataTypeFilter[] 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 (DataTypeFilter c : DataTypeFilter.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DataTypeFilter 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 nameNullPointerException- if the argument is null
-
-