|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sleepycat.bdb.collection.StoredContainer
com.sleepycat.bdb.collection.StoredCollection
com.sleepycat.bdb.collection.StoredKeySet
public class StoredKeySet
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.
| Constructor Summary | |
|---|---|
StoredKeySet(DataIndex index,
DataBinding keyBinding,
boolean writeAllowed)
Creates a key set view of a DataIndex. |
|
StoredKeySet(DataStore store,
DataBinding keyBinding,
boolean writeAllowed)
Creates a key set view of a DataStore. |
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.Object key)
Adds the specified key to this set if it is not already present (optional operation). |
boolean |
contains(java.lang.Object key)
Returns true if this set contains the specified key. |
boolean |
remove(java.lang.Object key)
Removes the specified key from this set if it is present (optional operation). |
| Methods inherited from class com.sleepycat.bdb.collection.StoredCollection |
|---|
addAll, containsAll, equals, iterator, iterator, join, join, removeAll, retainAll, toArray, toArray, toList, toString |
| Methods inherited from class com.sleepycat.bdb.collection.StoredContainer |
|---|
areDuplicatesAllowed, areDuplicatesOrdered, areKeysRenumbered, clear, isAutoCommit, isDirtyReadAllowed, isDirtyReadEnabled, isEmpty, isIndexed, isOrdered, isTransactional, isWriteAllowed, size |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
addAll, clear, containsAll, equals, hashCode, isEmpty, iterator, removeAll, retainAll, size, toArray, toArray |
| Constructor Detail |
|---|
public StoredKeySet(DataStore store,
DataBinding keyBinding,
boolean writeAllowed)
DataStore.
store - is the DataStore underlying the new collection.keyBinding - is the binding used to translate between key buffers
and key objects.writeAllowed - is true to create a read-write collection or false
to create a read-only collection.
java.lang.IllegalArgumentException - if formats are not consistently
defined or a parameter is invalid.
RuntimeExceptionWrapper - if a DbException is thrown.
public StoredKeySet(DataIndex index,
DataBinding keyBinding,
boolean writeAllowed)
DataIndex.
index - is the DataIndex underlying the new collection.keyBinding - is the binding used to translate between key buffers
and key objects.writeAllowed - is true to create a read-write collection or false
to create a read-only collection.
java.lang.IllegalArgumentException - if formats are not consistently
defined or a parameter is invalid.
RuntimeExceptionWrapper - if a DbException is thrown.| Method Detail |
|---|
public boolean add(java.lang.Object key)
Set.add(E) interface.
add in interface java.util.Collectionadd in interface java.util.Setjava.lang.UnsupportedOperationException - if the collection is indexed, or
if the collection is read-only.
RuntimeExceptionWrapper - if a DbException is thrown.public boolean remove(java.lang.Object key)
Set.remove(java.lang.Object) interface.
remove in interface java.util.Collectionremove in interface java.util.Setjava.lang.UnsupportedOperationException - if the collection is read-only.
RuntimeExceptionWrapper - if a DbException is thrown.public boolean contains(java.lang.Object key)
Set.contains(java.lang.Object) interface.
contains in interface java.util.Collectioncontains in interface java.util.SetRuntimeExceptionWrapper - if a DbException is thrown.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||