Class EnumUtilKt

  • All Implemented Interfaces:

    
    public final class EnumUtilKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static <T extends Enum<T>> T enumFromName(String value) Case-insensitive lookup of an enum entry by Enum.name.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • enumFromName

         final static <T extends Enum<T>> T enumFromName(String value)

        Case-insensitive lookup of an enum entry by Enum.name. Returns null when value is null or 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 of DIRECTORY). Returns null when value is null or no entry matches.