Package org.apache.logging.log4j.util
Class Cast
java.lang.Object
org.apache.logging.log4j.util.Cast
-
Method Summary
-
Method Details
-
cast
Returns the provided object cast to the generic parameter type or null when the argument is null.- Type Parameters:
T
- the type to cast- Parameters:
o
- object to cast- Returns:
- object after casting or null if the object was null
- Throws:
ClassCastException
- if the object cannot be cast to the provided type
-