Class Cast
- java.lang.Object
-
- org.antublue.test.engine.internal.util.Cast
-
public final class Cast extends Object
Class to cast an Object to another Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Tcast(Object object)Method to cast an Object to another Objectstatic <T> Tcast(Object object, Supplier<RuntimeException> runtimeExceptionSupplier)Method to cast an Object to another Object, throwing an Exception provided by the Supplier if there is a ClassCastException
-
-
-
Method Detail
-
cast
public static <T> T cast(Object object)
Method to cast an Object to another Object- Type Parameters:
T-- Parameters:
object-- Returns:
-
cast
public static <T> T cast(Object object, Supplier<RuntimeException> runtimeExceptionSupplier)
Method to cast an Object to another Object, throwing an Exception provided by the Supplier if there is a ClassCastException- Type Parameters:
T-- Parameters:
object-- Returns:
-
-