Package net.sf.basedb.core
Class ItemResultList<I extends BasicItem>
- java.lang.Object
-
- net.sf.basedb.core.AbstractResultList<I>
-
- net.sf.basedb.core.ItemResultList<I>
-
- All Implemented Interfaces:
Iterable<I>
,Collection<I>
,List<I>
,QueryResult
,ResultList<I>
public class ItemResultList<I extends BasicItem> extends AbstractResultList<I>
Return the results of anItemQuery
as a list.- Version:
- 2.0
- Author:
- Samuel, Nicklas
- See Also:
ItemQuery.list(DbControl)
- Last modified
- $Date: 2015-04-20 11:08:18 +0200 (må, 20 apr 2015) $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
ItemResultList.ResultListIterator<T extends BasicItem>
Inner class to implement the iterator returned by theiterator()
method.private class
ItemResultList.ResultListListIterator<T extends BasicItem>
Inner class to implement the iterator returned by thelistIterator()
method.
-
Field Summary
Fields Modifier and Type Field Description private List<? extends BasicData>
data
The internal list of BasicData objects.private DbControl
dc
The DbControl that was used in the query.private Class<I>
itemClass
The class of the items returned by the query (and this object).private Item
itemType
The type of items returned by the query.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(Object o)
boolean
equals(Object o)
I
get(int index)
Get a BasicItem derived object.private <E extends BasicItem>
Eget(Class<E> returnType, BasicData dataObject)
Item
getItemType()
Get the type of items contained in this list.int
hashCode()
int
indexOf(Object o)
boolean
isEmpty()
Iterator<I>
iterator()
int
lastIndexOf(Object o)
ListIterator<I>
listIterator()
ListIterator<I>
listIterator(int index)
int
size()
List<I>
subList(int fromIndex, int toIndex)
Object[]
toArray()
<T> T[]
toArray(T[] a)
-
Methods inherited from class net.sf.basedb.core.AbstractResultList
add, add, addAll, addAll, clear, containsAll, getTotalCount, remove, remove, removeAll, retainAll, set
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
replaceAll, sort, spliterator
-
-
-
-
Method Detail
-
contains
public boolean contains(Object o)
-
get
public I get(int index)
Get a BasicItem derived object.- Returns:
- Object of type I or null if no valid item object could be fetched with the internal data object
-
indexOf
public int indexOf(Object o)
-
lastIndexOf
public int lastIndexOf(Object o)
-
isEmpty
public boolean isEmpty()
-
listIterator
public ListIterator<I> listIterator()
-
listIterator
public ListIterator<I> listIterator(int index)
-
size
public int size()
-
toArray
public Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
getItemType
public Item getItemType()
Get the type of items contained in this list.- Returns:
- An
Item
object or null if not known
-
-