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>
Return the results of an
ItemQuery
as a list.- Version:
- 2.0
- Author:
- Samuel, Nicklas
- See Also:
- Last modified
- $Date: 2015-04-20 11:08:18 +0200 (må, 20 apr 2015) $
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate class
ItemResultList.ResultListIterator<T extends BasicItem>
Inner class to implement the iterator returned by theiterator()
method.private class
Inner class to implement the iterator returned by thelistIterator()
method. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
get
(int index) Get a BasicItem derived object.private <E extends BasicItem>
EGet the type of items contained in this list.int
hashCode()
int
boolean
isEmpty()
iterator()
int
listIterator
(int index) int
size()
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
-
Field Details
-
data
The internal list of BasicData objects. -
dc
The DbControl that was used in the query. -
itemClass
The class of the items returned by the query (and this object). -
itemType
The type of items returned by the query.
-
-
Constructor Details
-
ItemResultList
-
-
Method Details
-
contains
-
get
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
-
lastIndexOf
-
isEmpty
public boolean isEmpty() -
iterator
-
listIterator
-
listIterator
-
size
public int size() -
subList
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
equals
-
hashCode
public int hashCode() -
getItemType
Get the type of items contained in this list.- Returns:
- An
Item
object or null if not known
-
get
-