| java.lang.Object com.sleepycat.collections.StoredContainer com.sleepycat.collections.StoredCollection com.sleepycat.collections.StoredKeySet
All known Subclasses: com.sleepycat.collections.StoredSortedKeySet,
StoredKeySet | public class StoredKeySet extends StoredCollection implements Set(Code) | | The Set returned by Map.keySet() and which can also be constructed directly
if a Map is not needed.
Since this collection is a set it only contains one element for each key,
even when duplicates are allowed. Key set iterators are therefore
particularly useful for enumerating the unique keys of a store or index that
allows duplicates.
author: Mark Hayes |
StoredKeySet | public StoredKeySet(Database database, EntryBinding keyBinding, boolean writeAllowed)(Code) | | Creates a key set view of a
Database .
Parameters: database - is the Database underlying the new collection. Parameters: keyBinding - is the binding used to translate between key buffersand key objects. Parameters: writeAllowed - is true to create a read-write collection or falseto create a read-only collection. throws: IllegalArgumentException - if formats are not consistentlydefined or a parameter is invalid. throws: RuntimeExceptionWrapper - if a DatabaseException isthrown. |
add | public boolean add(Object key)(Code) | | Adds the specified key to this set if it is not already present
(optional operation).
When a key is added the value in the underlying data store will be
empty.
This method conforms to the
Set.add interface.
throws: UnsupportedOperationException - if the collection is indexed, orif the collection is read-only. throws: RuntimeExceptionWrapper - if a DatabaseException isthrown. |
contains | public boolean contains(Object key)(Code) | | Returns true if this set contains the specified key.
This method conforms to the
Set.contains interface.
throws: RuntimeExceptionWrapper - if a DatabaseException isthrown. |
hasValues | boolean hasValues()(Code) | | |
iterateDuplicates | boolean iterateDuplicates()(Code) | | |
remove | public boolean remove(Object key)(Code) | | Removes the specified key from this set if it is present (optional
operation).
If duplicates are allowed, this method removes all duplicates for the
given key.
This method conforms to the
Set.remove interface.
throws: UnsupportedOperationException - if the collection is read-only. throws: RuntimeExceptionWrapper - if a DatabaseException isthrown. |
Fields inherited from com.sleepycat.collections.StoredCollection | final public static int DEFAULT_ITERATOR_BLOCK_SIZE(Code)(Java Doc)
|
|
|