Package org.processmining.framework.util
Class Cast
java.lang.Object
org.processmining.framework.util.Cast
-
Method Summary
-
Method Details
-
cast
Casts the given object to type T. This static method can be used to avoid "unchecked cast" warnings. Note that a runtime exception is still thrown if the cast is not valid. However, using this method eliminates the use of the @@SupressWarnings annotation, which obfuscates any valid warnings. Note that this method should be used in combination with assertions to assert the right type!- Type Parameters:
T
- The type to cast to.- Parameters:
x
- the object to cast- Returns:
- (T) x;
-