Package org.dellroad.stuff.vaadin7
Interface QueryList<T>
-
- All Known Implementing Classes:
AlwaysInvalidQueryList,SimpleQueryList,WindowQueryList
public interface QueryList<T>Cacheable list of Java objects backing anAbstractQueryContainer. Instances contain a list of Java objects (or some portion thereof), and may become invalid over time.- See Also:
AbstractQueryContainer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tget(long index)Get an item in the list, or throw an exception if this instance is no longer valid or cannot provide the item.longsize()Get the total size of this list.
-
-
-
Method Detail
-
size
long size()
Get the total size of this list.For any given
QueryListinstance, this method is expected to return a the same value if invoked multiple times. Therefore, callers may safely choose to invoke it only once on a given instance and cache the result.- Returns:
- total size of list
-
get
T get(long index) throws InvalidQueryListException
Get an item in the list, or throw an exception if this instance is no longer valid or cannot provide the item.- Parameters:
index- index of the item (zero-based)- Returns:
- the list item at
index - Throws:
IndexOutOfBoundsException- ifindexis less than zero or greater than or equal tosize()InvalidQueryListException- if this list has become invalid or cannot provide the item
-
-