Class Cast
java.lang.Object
org.apache.logging.log4j.util.Cast
- Since:
- 2.22.0
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Cast
private Cast()
-
-
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
-