Package com.adobe.testing.s3mock.s3.dto
Class EnumUtilKt
-
- All Implemented Interfaces:
public final class EnumUtilKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Enum<T>> TenumFromName(String value)Case-insensitive lookup of an enum entry by Enum.name. final static <T extends Enum<T>> TenumFromValue(String value, Function1<T, String> selector)Case-insensitive lookup of an enum entry using selector to extract the comparison value. -
-
Method Detail
-
enumFromName
final static <T extends Enum<T>> T enumFromName(String value)
Case-insensitive lookup of an enum entry by Enum.name. Returns
nullwhen value isnullor no entry matches.
-
enumFromValue
final static <T extends Enum<T>> T enumFromValue(String value, Function1<T, String> selector)
Case-insensitive lookup of an enum entry using selector to extract the comparison value. Use when the serialised value differs from Enum.name (e.g.
"Directory"instead ofDIRECTORY). Returnsnullwhen value isnullor no entry matches.
-
-
-
-