|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.faces.util.TypedCollections
public class TypedCollections
| Constructor Summary | |
|---|---|
TypedCollections()
|
|
| Method Summary | ||
|---|---|---|
private static boolean |
checkCollectionMembers(java.util.Collection<?> c,
java.lang.Class<?> type)
Dynamically check that the members of the collection are all instances of the given type (or null). |
|
static
|
dynamicallyCastCollection(java.util.Collection<?> c,
java.lang.Class<E> type,
java.lang.Class<TypedC> collectionType)
Dynamically check that the members of the collection are all instances of the given type (or null), and that the collection itself is of the given collection type. |
|
static
|
dynamicallyCastList(java.util.List<?> list,
java.lang.Class<E> type)
Dynamically check that the members of the list are all instances of the given type (or null). |
|
static
|
dynamicallyCastMap(java.util.Map<?,?> map,
java.lang.Class<K> keyType,
java.lang.Class<V> valueType)
Dynamically check that the keys and values in the map are all instances of the correct types (or null). |
|
static
|
dynamicallyCastSet(java.util.Set<?> set,
java.lang.Class<E> type)
Dynamically check that the members of the set are all instances of the given type (or null). |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TypedCollections()
| Method Detail |
|---|
private static boolean checkCollectionMembers(java.util.Collection<?> c,
java.lang.Class<?> type)
public static <E,TypedC extends java.util.Collection<E>> TypedC dynamicallyCastCollection(java.util.Collection<?> c,
java.lang.Class<E> type,
java.lang.Class<TypedC> collectionType)
E - the collection's element typec - the collection to casttype - the class of the collection's element type.
java.lang.ClassCastException
public static <E> java.util.List<E> dynamicallyCastList(java.util.List<?> list,
java.lang.Class<E> type)
E - the list's element typelist - the list to casttype - the class of the list's element type.
java.lang.ClassCastException
public static <E> java.util.Set<E> dynamicallyCastSet(java.util.Set<?> set,
java.lang.Class<E> type)
E - the set's element typeset - the set to casttype - the class of the set's element type.
java.lang.ClassCastException
public static <K,V> java.util.Map<K,V> dynamicallyCastMap(java.util.Map<?,?> map,
java.lang.Class<K> keyType,
java.lang.Class<V> valueType)
K - the map's key typeV - the map's value typemap - the map to castkeyType - the class of the map's key type.keyType - the class of the map's key type.
java.lang.ClassCastException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||