Inheritance diagram for com::sleepycat::collections::StoredList:
Public Member Functions | |
StoredList (Database database, EntryBinding valueBinding, boolean writeAllowed) | |
StoredList (Database database, EntityBinding valueEntityBinding, boolean writeAllowed) | |
StoredList (Database database, EntryBinding valueBinding, PrimaryKeyAssigner keyAssigner) | |
StoredList (Database database, EntityBinding valueEntityBinding, PrimaryKeyAssigner keyAssigner) | |
void | add (int index, Object value) |
boolean | add (Object value) |
int | append (Object value) |
boolean | addAll (int index, Collection coll) |
boolean | contains (Object value) |
Object | get (int index) |
int | indexOf (Object value) |
int | lastIndexOf (Object value) |
ListIterator | listIterator () |
ListIterator | listIterator (int index) |
Object | remove (int index) |
boolean | remove (Object value) |
Object | set (int index, Object value) |
List | subList (int fromIndex, int toIndex) |
boolean | equals (Object other) |
For all stored lists the keys of the underlying Database must have record number format, and therefore the store or index must be a RECNO, RECNO-RENUMBER, QUEUE, or BTREE-RECNUM database. Only RECNO-RENUMBER allows true list behavior where record numbers are renumbered following the position of an element that is added or removed. For the other access methods (RECNO, QUEUE, and BTREE-RECNUM), stored Lists are most useful as read-only collections where record numbers are not required to be sequential.
Note that this class does not conform to the standard Java collections interface in the following ways:
UnsupportedOperationException
because, for performance reasons, databases do not maintain their total record count. In addition to the standard List methods, this class provides the following methods for stored lists only. Note that the use of these methods is not compatible with the standard Java collections interface.
Definition at line 57 of file StoredList.java.
|
Creates a list view of a Database.
Definition at line 82 of file StoredList.java. Referenced by subList(). |
|
Creates a list entity view of a Database.
Definition at line 106 of file StoredList.java. |
|
Creates a list view of a Database with a PrimaryKeyAssigner. Writing is allowed for the created list.
Definition at line 131 of file StoredList.java. |
|
Creates a list entity view of a Database with a PrimaryKeyAssigner. Writing is allowed for the created list.
Definition at line 156 of file StoredList.java. |
|
Appends the specified element to the end of this list (optional operation). This method conforms to the List#add(Object) interface.
Definition at line 218 of file StoredList.java. References com::sleepycat::collections::DataView::append(). |
|
Inserts the specified element at the specified position in this list (optional operation). This method conforms to the List#add(int, Object) interface.
Definition at line 182 of file StoredList.java. References com::sleepycat::collections::DataView::append(), com::sleepycat::collections::DataCursor::getSearchKey(), and com::sleepycat::collections::DataCursor::putBefore(). |
|
Inserts all of the elements in the specified collection into this list at the specified position (optional operation). This method conforms to the List#addAll(int, Collection) interface.
Definition at line 289 of file StoredList.java. References com::sleepycat::collections::DataView::append(), com::sleepycat::collections::DataCursor::getSearchKey(), and com::sleepycat::collections::DataCursor::putBefore(). |
|
Appends a given value returning the newly assigned index. If a com.sleepycat.collections.PrimaryKeyAssigner is associated with Store for this list, it will be used to assigned the returned index. Otherwise the Store must be a QUEUE or RECNO database and the next available record number is assigned as the index. This method does not exist in the standard List interface.
Definition at line 251 of file StoredList.java. References com::sleepycat::collections::DataView::append(). |
|
Returns true if this list contains the specified element. This method conforms to the List#contains interface.
Definition at line 332 of file StoredList.java. |
|
Compares the specified object with this list for equality. A value comparison is performed by this method and the stored values are compared rather than calling the equals() method of each element. This method conforms to the List#equals interface.
Reimplemented from com::sleepycat::collections::StoredCollection. Definition at line 537 of file StoredList.java. References listIterator(). |
|
Returns the element at the specified position in this list. This method conforms to the List#get interface.
Definition at line 344 of file StoredList.java. |
|
Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element. This method conforms to the List#indexOf interface.
Definition at line 357 of file StoredList.java. Referenced by lastIndexOf(). |
|
Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element. This method conforms to the List#lastIndexOf interface.
Definition at line 370 of file StoredList.java. References indexOf(). |
|
Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list. The iterator will be read-only if the collection is read-only. This method conforms to the List#listIterator(int) interface.
Definition at line 427 of file StoredList.java. References com::sleepycat::collections::StoredIterator::close(), com::sleepycat::collections::StoredContainer::isWriteAllowed(), com::sleepycat::collections::StoredCollection::iterator(), and com::sleepycat::collections::StoredIterator::moveToIndex(). |
|
Returns a list iterator of the elements in this list (in proper sequence). The iterator will be read-only if the collection is read-only. This method conforms to the List#listIterator() interface.
Definition at line 409 of file StoredList.java. References com::sleepycat::collections::StoredContainer::isWriteAllowed(), and com::sleepycat::collections::StoredCollection::iterator(). Referenced by equals(). |
|
Removes the first occurrence in this list of the specified element (optional operation). This method conforms to the List#remove(Object) interface.
Definition at line 471 of file StoredList.java. |
|
Removes the element at the specified position in this list (optional operation). This method conforms to the List#remove(int) interface.
Definition at line 449 of file StoredList.java. |
|
Replaces the element at the specified position in this list with the specified element (optional operation). This method conforms to the List#set interface.
Definition at line 491 of file StoredList.java. |
|
Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive. Note that add() and remove() may not be called for the returned sublist. This method conforms to the List#subList interface.
Definition at line 509 of file StoredList.java. References StoredList(), and com::sleepycat::collections::DataView::subView(). |