Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

com::sleepycat::collections::StoredCollection Class Reference

Inheritance diagram for com::sleepycat::collections::StoredCollection:

com::sleepycat::collections::StoredContainer com::sleepycat::collections::StoredEntrySet com::sleepycat::collections::StoredKeySet com::sleepycat::collections::StoredList com::sleepycat::collections::StoredValueSet com::sleepycat::collections::StoredSortedEntrySet com::sleepycat::collections::StoredSortedKeySet com::sleepycat::collections::StoredSortedValueSet

Public Member Functions

Iterator iterator ()
StoredIterator iterator (boolean writeAllowed)
Object[] toArray ()
Object[] toArray (Object[] a)
boolean containsAll (Collection coll)
boolean addAll (Collection coll)
boolean removeAll (Collection coll)
boolean retainAll (Collection coll)
boolean equals (Object other)
List toList ()
String toString ()
StoredIterator join (StoredContainer[] indices, Object[] indexKeys, JoinConfig joinConfig)

Detailed Description

A abstract base class for all stored collections. This class, and its base class StoredContainer, provide implementations of most methods in the Collection interface. Other methods, such as add and remove, are provided by concrete classes that extend this class.

Note that this class does not conform to the standard Java collections interface in the following ways:

In addition, this class provides the following methods for stored collections only. Note that the use of these methods is not compatible with the standard Java collections interface.

Author:
Mark Hayes

Definition at line 51 of file StoredCollection.java.


Member Function Documentation

boolean com::sleepycat::collections::StoredCollection::addAll Collection  coll  )  [inline]
 

Adds all of the elements in the specified collection to this collection (optional operation). This method calls the add(Object) method of the concrete collection class, which may or may not be supported. This method conforms to the Collection#addAll interface.

Exceptions:
UnsupportedOperationException if the collection is read-only, or if the collection is indexed, or if the add method is not supported by the concrete collection.
RuntimeExceptionWrapper if a DatabaseException is thrown.

Definition at line 211 of file StoredCollection.java.

boolean com::sleepycat::collections::StoredCollection::containsAll Collection  coll  )  [inline]
 

Returns true if this collection contains all of the elements in the specified collection. This method conforms to the Collection#containsAll interface.

Exceptions:
RuntimeExceptionWrapper if a DatabaseException is thrown.

Definition at line 183 of file StoredCollection.java.

boolean com::sleepycat::collections::StoredCollection::equals Object  other  )  [inline]
 

Compares the specified object with this collection 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 Collection#equals interface.

Exceptions:
RuntimeExceptionWrapper if a DatabaseException is thrown.

Reimplemented in com::sleepycat::collections::StoredList.

Definition at line 291 of file StoredCollection.java.

References iterator().

StoredIterator com::sleepycat::collections::StoredCollection::iterator boolean  writeAllowed  )  [inline]
 

Returns a read or read-write iterator over the elements in this collection. This method does not exist in the standard Collection interface.

Parameters:
writeAllowed is true to open a read-write iterator or false to open a read-only iterator. If the collection is read-only the iterator will always be read-only.
Returns:
a StoredIterator for this collection.
Exceptions:
IllegalStateException if writeAllowed is true but the collection is read-only.
RuntimeExceptionWrapper if a DatabaseException is thrown.
See also:
isWriteAllowed

Definition at line 112 of file StoredCollection.java.

References com::sleepycat::collections::StoredContainer::isWriteAllowed().

Iterator com::sleepycat::collections::StoredCollection::iterator  )  [inline]
 

Returns an iterator over the elements in this collection. The iterator will be read-only if the collection is read-only. This method conforms to the Collection#iterator interface.

Returns:
a StoredIterator for this collection.
Exceptions:
RuntimeExceptionWrapper if a DatabaseException is thrown.
See also:
isWriteAllowed

Definition at line 88 of file StoredCollection.java.

References com::sleepycat::collections::StoredContainer::isWriteAllowed().

Referenced by equals(), com::sleepycat::collections::StoredList::listIterator(), toArray(), toList(), com::sleepycat::collections::StoredEntrySet::toString(), and toString().

StoredIterator com::sleepycat::collections::StoredCollection::join StoredContainer[]  indices,
Object[]  indexKeys,
JoinConfig  joinConfig
[inline]
 

Returns an iterator representing an equality join of the indices and index key values specified. This method does not exist in the standard Collection interface.

The returned iterator supports only the two methods: hasNext() and next(). All other methods will throw UnsupportedOperationException.

Parameters:
indices is an array of indices with elements corresponding to those in the indexKeys array.
indexKeys is an array of index key values identifying the elements to be selected.
joinConfig is the join configuration, or null to use the default configuration.
Returns:
an iterator over the elements in this collection that match all specified index key values.
Exceptions:
IllegalArgumentException if this collection is indexed or if a given index does not have the same store as this collection.
RuntimeExceptionWrapper if a DatabaseException is thrown.

Definition at line 392 of file StoredCollection.java.

References com::sleepycat::collections::DataView::join().

boolean com::sleepycat::collections::StoredCollection::removeAll Collection  coll  )  [inline]
 

Removes all this collection's elements that are also contained in the specified collection (optional operation). This method conforms to the Collection#removeAll interface.

Exceptions:
UnsupportedOperationException if the collection is read-only.
RuntimeExceptionWrapper if a DatabaseException is thrown.

Definition at line 241 of file StoredCollection.java.

Referenced by retainAll().

boolean com::sleepycat::collections::StoredCollection::retainAll Collection  coll  )  [inline]
 

Retains only the elements in this collection that are contained in the specified collection (optional operation). This method conforms to the Collection#removeAll interface.

Exceptions:
UnsupportedOperationException if the collection is read-only.
RuntimeExceptionWrapper if a DatabaseException is thrown.

Definition at line 256 of file StoredCollection.java.

References removeAll().

Object [] com::sleepycat::collections::StoredCollection::toArray Object[]  a  )  [inline]
 

Returns an array of all the elements in this collection whose runtime type is that of the specified array. This method conforms to the Collection#toArray(Object[]) interface.

Exceptions:
RuntimeExceptionWrapper if a DatabaseException is thrown.

Definition at line 152 of file StoredCollection.java.

References iterator().

Object [] com::sleepycat::collections::StoredCollection::toArray  )  [inline]
 

Returns an array of all the elements in this collection. This method conforms to the Collection#toArray() interface.

Exceptions:
RuntimeExceptionWrapper if a DatabaseException is thrown.

Definition at line 129 of file StoredCollection.java.

References iterator().

List com::sleepycat::collections::StoredCollection::toList  )  [inline]
 

Returns a copy of this collection as an ArrayList. This is the same as toArray() but returns a collection instead of an array.

Returns:
an ArrayList containing a copy of all elements in this collection.
Exceptions:
RuntimeExceptionWrapper if a DatabaseException is thrown.

Definition at line 329 of file StoredCollection.java.

References iterator().

String com::sleepycat::collections::StoredCollection::toString  )  [inline]
 

Converts the collection to a string representation for debugging. WARNING: The returned string may be very large.

Returns:
the string representation.
Exceptions:
RuntimeExceptionWrapper if a DatabaseException is thrown.

Reimplemented in com::sleepycat::collections::StoredEntrySet.

Definition at line 350 of file StoredCollection.java.

References iterator().


The documentation for this class was generated from the following file:
Generated on Sun Dec 25 12:15:00 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2