public class Generics extends Object
| Constructor and Description |
|---|
Generics() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
cast(Object x)
Casts an object by type inference.
|
static <T> Class<T> |
getClass(T t)
Returns the generic Class object for a given argument.
|
public static <T> T cast(Object x)
x - Object that will be castedpublic static <T> Class<T> getClass(T t)
T - Type the argument returnst - object to checkCopyright © 2017. All rights reserved.