public final class ObjectUtil
extends Object
-
Method Summary
static <U,
T extends U>
T
static <X extends Throwable,
U,
T extends U>
T
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
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
- Throws:
X extends Throwable
-
forceCast
public static <U,
T extends U> T forceCast(U in,
Class<T> type)