Package com.saperion.common.lang.unsafe
Class Unsafe
java.lang.Object
com.saperion.common.lang.unsafe.Unsafe
Utility class that provides some unsafe operations. Use these operations with care and only if really necessary!
- Author:
- agz
-
Method Summary
-
Method Details
-
cast
Unsafe cast that instructs the compiler to suppress compiler warnings. ATTENTION: This increases the chance of runtime exceptions if used improperly. This method is intended for situations, where the compiler warning is wrong and there is no correct way to go around it. This often occurs when casting collections where unmanageable warnings relating the generic types appear.- Type Parameters:
T
- destination type- Parameters:
object
- object to cast- Returns:
- casted object
-