|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.AbstractSequentialList
|
+--com.solarmetric.kodo.runtime.objectprovider.MergedResultList
A MergedResultList is a wrapper for multiple instances of a
ResultList that may be returned. Support exists for
maintaining ordering of the internally held results, provided
that each of the individual results are themselves ordered and
a Comparator is provided.
| Inner Class Summary | |
protected class |
MergedResultList.MergedIterator
This iterator provides access to the internally held lists with no support for manual ordering |
protected class |
MergedResultList.OrderedMergedIterator
This iterator provides support for maintaining result list ordering if a Comparator exists for the owning
MergedResultList.MergedIterator. |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
MergedResultList()
Constructor: create an empty MergedResultList. |
|
MergedResultList(Collection collection)
Constructor: create a MergedResultList with the contents of the specified Collection. |
|
MergedResultList(ResultList[] lists,
Comparator order)
Constructor: create a new MergedResultList from the
specified array of ResultList objects. |
|
| Method Summary | |
void |
checkClosed()
Invoke ResultList.checkClosed() on all the internally
held ResultLists |
void |
close()
Invoke ResultList.close() on all the internally
held ResultLists |
boolean |
equals(Object other)
|
Object |
get(int index)
Maintain a cache for random access. |
int |
getInstantiatedCount()
Sum the results of ResultList.getInstantiatedCount() on
all the internally held ResultLists |
int |
hashCode()
hashCode is calculated as the sum of all the
hashCodes of the internally held lists. |
boolean |
isClosed()
Returns true if any of the internally held lists are closed. |
ListIterator |
listIterator(int idx)
Returns a new MergedResultList.MergedIterator for this
ResultList that will deal with any ordering necessary. |
int |
size()
Size calculation will just sum up the the sized of embedded ResultLists. |
Object |
writeReplace()
Convert this object to a LinkedList for serialization |
| Methods inherited from class java.util.AbstractSequentialList |
add, addAll, iterator, remove, set |
| Methods inherited from class java.util.AbstractList |
add, clear, indexOf, lastIndexOf, listIterator, removeRange, subList |
| Methods inherited from class java.util.AbstractCollection |
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|
| Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, contains, containsAll, indexOf, isEmpty, iterator, lastIndexOf, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray |
| Constructor Detail |
public MergedResultList(ResultList[] lists,
Comparator order)
MergedResultList from the
specified array of ResultList objects. If a
Comparator is not null, then ordering will be
done in-memory. This requires that each element of the
lists array already be ordered according to the
rules in the specified Comparator. Elements of the
lists that are null or of size zero will be excluded.public MergedResultList()
public MergedResultList(Collection collection)
Collection. This method
only exists because it is suggested by the Collections
specification.| Method Detail |
public Object get(int index)
get in interface Listget in class AbstractSequentialListpublic void close()
ResultList.close() on all the internally
held ResultListsclose in interface ResultListpublic boolean isClosed()
isClosed in interface ResultListpublic void checkClosed()
ResultList.checkClosed() on all the internally
held ResultListscheckClosed in interface ResultListpublic int getInstantiatedCount()
ResultList.getInstantiatedCount() on
all the internally held ResultListsgetInstantiatedCount in interface ResultList
public Object writeReplace()
throws ObjectStreamException
LinkedList for serializationpublic int hashCode()
hashCode is calculated as the sum of all the
hashCodes of the internally held lists.hashCode in interface ListhashCode in class AbstractListpublic boolean equals(Object other)
equals in interface Listequals in class AbstractListpublic final int size()
size in interface Listsize in class AbstractCollectionpublic ListIterator listIterator(int idx)
MergedResultList.MergedIterator for this
ResultList that will deal with any ordering necessary.
Ordered lists will return an instance of
MergedResultList.OrderedMergedIterator.listIterator in interface ListlistIterator in class AbstractSequentialList
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||