Package org.jgrapht.util
Class TypeUtil<T>
java.lang.Object
org.jgrapht.util.TypeUtil<T>
TypeUtil isolates type-unsafety so that code that which uses it for
legitimate reasons can stay warning-free.
- Author:
- John V. Sichi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
uncheckedCast
(Object o, TypeUtil<T> typeDecl) Casts an object to a type.
-
Constructor Details
-
TypeUtil
public TypeUtil()
-
-
Method Details
-
uncheckedCast
Casts an object to a type.- Parameters:
o
- object to be casttypeDecl
- conveys the target type information; the actual value is unused and can be null since this is all just stupid compiler tricks- Returns:
- the result of the cast
-