Class Cast
java.lang.Object
org.antublue.test.engine.internal.util.Cast
Class to cast an Object to another Object
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TMethod 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 Details
-
cast
Method to cast an Object to another Object- Type Parameters:
T- the return type- Parameters:
object- object- Returns:
- the return value
-
cast
Method to cast an Object to another Object, throwing an Exception provided by the Supplier if there is a ClassCastException- Type Parameters:
T- the return type- Parameters:
object- objectruntimeExceptionSupplier- runtimeExceptionSupplier- Returns:
- the return value
-