Package org.elasticsearch.core
Class Types
java.lang.Object
org.elasticsearch.core.Types
Contains utilities for working with Java types.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
forciblyCast
(Object argument) There are some situations where we cannot appease javac's type checking, and we need to forcibly cast an object's type.
-
Method Details
-
forciblyCast
There are some situations where we cannot appease javac's type checking, and we need to forcibly cast an object's type. Please don't use this method unless you have no choice.- Type Parameters:
T
- the inferred type to which to cast the argument- Parameters:
argument
- the object to cast- Returns:
- a cast version of the argument
-