Package com.hypixel.hytale.server.core
Enum Class NameMatching
- All Implemented Interfaces:
Serializable,Comparable<NameMatching>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Comparator<String> static NameMatchingprivate final BiPredicate<String, String> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateNameMatching(Comparator<String> comparator, BiPredicate<String, String> equality) -
Method Summary
Modifier and TypeMethodDescription<T> Tfind(Collection<T> players, String value, Function<T, String> getter) static <T> Tfind(Collection<T> players, String value, Function<T, String> getter, Comparator<String> comparator, BiPredicate<String, String> equality) static NameMatchingReturns the enum constant of this class with the specified name.static NameMatching[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EXACT
-
EXACT_IGNORE_CASE
-
STARTS_WITH
-
STARTS_WITH_IGNORE_CASE
-
-
Field Details
-
DEFAULT
-
comparator
-
equality
-
-
Constructor Details
-
NameMatching
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getComparator
-
find
@Nullable public <T> T find(@Nonnull Collection<T> players, String value, @Nonnull Function<T, String> getter) -
find
@Nullable public static <T> T find(@Nonnull Collection<T> players, String value, @Nonnull Function<T, String> getter, @Nonnull Comparator<String> comparator, @Nonnull BiPredicate<String, String> equality)
-