public class CollectionWrapperFactory
extends java.lang.Object
Constructor and Description |
---|
CollectionWrapperFactory() |
Modifier and Type | Method and Description |
---|---|
static <T> java.util.Collection<T> |
wrap(java.util.Collection coll,
java.lang.Class<T> elementType)
Return a read only cast view of the supplied ungeneric collection, based on the element type given
|
static <T> java.util.List<T> |
wrap(java.util.List list,
java.lang.Class<T> elementType)
Return a read only cast view of the supplied ungeneric list, based on the element type given
|
public static <T> java.util.Collection<T> wrap(java.util.Collection coll, java.lang.Class<T> elementType)
coll
- The collection to castelementType
- the supertype contained in the collectionpublic static <T> java.util.List<T> wrap(java.util.List list, java.lang.Class<T> elementType)
list
- The list to castelementType
- the supertype contained in the list