public class AlwaysInvalidQueryList<T> extends Object implements QueryList<T>
QueryList that always throws InvalidQueryListException.| Constructor and Description |
|---|
AlwaysInvalidQueryList(long size)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
T |
get(long index)
Get an item in the list, or throw an exception if this instance is no longer valid
or cannot provide the item.
|
long |
size()
Get the total size of this list.
|
public AlwaysInvalidQueryList(long size)
size - size of this list to report via sizeIllegalArgumentException - if size is negativepublic long size()
QueryList
For any given QueryList instance, 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.
public T get(long index) throws InvalidQueryListException
QueryListget in interface QueryList<T>index - index of the item (zero-based)indexInvalidQueryListException - if this list has become invalid or cannot provide the itemCopyright © 2017. All rights reserved.