Modifier and Type | Field | Description |
---|---|---|
Type |
itemGenericType |
|
Class |
itemType |
Type of the individual item
|
protected Collection |
r |
Modifier | Constructor | Description |
---|---|---|
protected |
Lister(Class itemType,
Type itemGenericType) |
|
protected |
Lister(Class itemType,
Type itemGenericType,
Collection r) |
Modifier and Type | Method | Description |
---|---|---|
void |
add(Object o) |
|
static <T> Lister<T> |
create(Class<T> c,
Type t) |
Creates a
Lister instance that produces the given type. |
static Lister |
create(Type t) |
Creates a
Lister instance that produces the given type. |
abstract T |
toCollection() |
public final Class itemType
public final Type itemGenericType
protected final Collection r
protected Lister(Class itemType, Type itemGenericType, Collection r)
public void add(Object o)
public abstract T toCollection()
public static <T> Lister<T> create(Class<T> c, Type t)
Lister
instance that produces the given type.c
- The erasure version of 't'. This is taken
as a parameter as a performance optimizaiton.IllegalArgumentException
- if the given type does look like a collection yet this implementation
is not capable of how to handle it.Copyright © 2019. All rights reserved.