Package org.jvnet.tiger_types
Class Lister<T>
- java.lang.Object
-
- org.jvnet.tiger_types.Lister<T>
-
-
Field Summary
Fields Modifier and Type Field Description Type
itemGenericType
Class
itemType
Type of the individual itemprotected Collection
r
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
add(Object o)
static <T> Lister<T>
create(Class<T> c, Type t)
Creates aLister
instance that produces the given type.static Lister
create(Type t)
Creates aLister
instance that produces the given type.abstract T
toCollection()
-
-
-
Field Detail
-
itemType
public final Class itemType
Type of the individual item
-
itemGenericType
public final Type itemGenericType
-
r
protected final Collection r
-
-
Constructor Detail
-
Lister
protected Lister(Class itemType, Type itemGenericType, Collection r)
-
-
Method Detail
-
add
public void add(Object o)
-
toCollection
public abstract T toCollection()
-
create
public static <T> Lister<T> create(Class<T> c, Type t)
Creates aLister
instance that produces the given type.- Parameters:
c
- The erasure version of 't'. This is taken as a parameter as a performance optimizaiton.- Returns:
- null if the given type doesn't look like a collection.
- Throws:
IllegalArgumentException
- if the given type does look like a collection yet this implementation is not capable of how to handle it.
-
-