Class GenericUtil


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T,​U extends T>
      java.util.function.Function<T,​U>
      castOrThrow​(java.lang.Class<U> expectedClazz)  
      static <T,​U extends T>
      U
      castOrThrow​(T from, java.lang.Class<U> expectedClazz)  
      • Methods inherited from class java.lang.Object

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

      • castOrThrow

        public static <T,​U extends T> java.util.function.Function<T,​U> castOrThrow​(java.lang.Class<U> expectedClazz)
      • castOrThrow

        public static <T,​U extends T> U castOrThrow​(T from,
                                                          java.lang.Class<U> expectedClazz)