|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.lang.Generics
public class Generics
Utilities to handle generic types, such as converting a non-type object to a generic type without warning.
Constructor Summary | |
---|---|
Generics()
|
Method Summary | ||
---|---|---|
static
|
cast(java.lang.Class cls)
Returns a type-safe generic class of the given type-less class. |
|
static
|
cast(java.util.Collection col)
Returns a type-safe generic collection of the given un-typed collection. |
|
static
|
cast(java.util.Enumeration en)
Returns a type-safe generic enumeration of the given un-typed enumeration. |
|
static
|
cast(java.util.Iterator it)
Returns a type-safe generic iterator of the given un-typed iterator. |
|
static
|
cast(java.util.List list)
Returns a type-safe generic list of the given un-typed list. |
|
static
|
cast(java.util.ListIterator it)
Returns a type-safe generic list iterator of the given un-typed list iterator. |
|
static
|
cast(java.util.Map map)
Returns a type-safe generic map of the given un-typed map. |
|
static
|
cast(java.lang.Object o)
Force to cast an object to the given type. |
|
static
|
cast(java.util.Set set)
Returns a type-safe generic set of the given un-typed set. |
|
static
|
cast(java.lang.ThreadLocal tl)
Returns a type-safe generic thread-local of the given un-typed thread-local. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Generics()
Method Detail |
---|
public static final <T> java.lang.Class<T> cast(java.lang.Class cls)
public static final <T> T cast(java.lang.Object o)
o
is an instance of T.
public static final <T> java.util.Iterator<T> cast(java.util.Iterator it)
public static final <T> java.util.ListIterator<T> cast(java.util.ListIterator it)
public static final <T> java.util.Enumeration<T> cast(java.util.Enumeration en)
public static final <T> java.util.Collection<T> cast(java.util.Collection col)
public static final <T> java.util.List<T> cast(java.util.List list)
public static final <T> java.util.Set<T> cast(java.util.Set set)
public static final <K,V> java.util.Map<K,V> cast(java.util.Map map)
public static final <T> java.lang.ThreadLocal<T> cast(java.lang.ThreadLocal tl)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |