public class Enums extends Object
| 构造器和说明 |
|---|
Enums() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <E extends Enum<E>> |
checkDuplicated(Class<E> enumType,
Function<E,?> mapper) |
static <E extends Enum<E>> |
toMap(Class<E> enumType)
Gets the
Map of enums by name. |
static <K,E extends Enum<E>> |
toMap(Class<E> enumType,
Function<E,K> keyMapper)
Returns
Map of enum |
public static <E extends Enum<E>> Map<String,E> toMap(Class<E> enumType)
Map of enums by name.E - map key mapperenumType - the enum typeEnumUtils.getEnumMap(Class)public static <K,E extends Enum<E>> Map<K,E> toMap(Class<E> enumType, Function<E,K> keyMapper)
Map of enumK - then map key typeE - the enum typeenumType - the enum typekeyMapper - map key mapperCopyright © 2024. All rights reserved.