Class EnumUtils


  • public final class EnumUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T extends java.lang.Enum<T>,​K>
      T
      enumByKey​(@NotNull java.lang.Class<T> enumType, @NotNull java.util.function.Function<T,​K> keyFunction, K key)  
      static <T extends java.lang.Enum<T>>
      T
      enumByOrdinal​(@NotNull java.lang.Class<T> enumType, int ordinal)  
      • Methods inherited from class java.lang.Object

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

      • enumByOrdinal

        @NotNull
        public static <T extends java.lang.Enum<T>> T enumByOrdinal​(@NotNull
                                                                    @NotNull java.lang.Class<T> enumType,
                                                                    int ordinal)
      • enumByKey

        @NotNull
        public static <T extends java.lang.Enum<T>,​K> T enumByKey​(@NotNull
                                                                        @NotNull java.lang.Class<T> enumType,
                                                                        @NotNull
                                                                        @NotNull java.util.function.Function<T,​K> keyFunction,
                                                                        @NotNull
                                                                        K key)