Class ObjectUtil


  • public final class ObjectUtil
    extends Object
    • Method Detail

      • tryCast

        public static <U,​T extends U> Optional<T> tryCast​(U in,
                                                                Class<T> type)
      • forceCast

        public static <X extends Throwable,​U,​T extends U> T forceCast​(U in,
                                                                                  Class<T> type,
                                                                                  Supplier<? extends X> exceptionSupplier)
                                                                           throws X extends Throwable
        Throws:
        X extends Throwable
      • forceCast

        public static <U,​T extends U> T forceCast​(U in,
                                                        Class<T> type)