public final class EnumHelpers
extends java.lang.Object
| Constructor and Description |
|---|
EnumHelpers() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends java.lang.Enum<T>> |
indexById(java.lang.Class<T> enumClass,
java.util.function.ToIntFunction<T> getId)
Indexes the values of the given Enum by a specified Id function.
|
public static <T extends java.lang.Enum<T>> T[] indexById(java.lang.Class<T> enumClass,
java.util.function.ToIntFunction<T> getId)
Notes:
T - Type of the enum.enumClass - The Enum Class.getId - A function that returns an Id for each enum value.