Package info.u_team.u_team_core.util
Class CastUtil
java.lang.Object
info.u_team.u_team_core.util.CastUtil
Utility methods for casts
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
uncheckedCast
(Object object) Convenient helper method for unchecked class without suppressing warnings.
-
Constructor Details
-
CastUtil
public CastUtil()
-
-
Method Details
-
uncheckedCast
Convenient helper method for unchecked class without suppressing warnings. CAREFULL, CAST IS STILL UNCHECKED!- Type Parameters:
T
- The type that the object should be- Parameters:
object
- The object- Returns:
- Casted object to the desired type
- Throws:
ClassCastException
- when unchecked cast fails
-