public class StoredKeySet extends StoredCollection implements java.util.Set
DEFAULT_ITERATOR_BLOCK_SIZE
Constructor and Description |
---|
StoredKeySet(Database database,
EntryBinding keyBinding,
boolean writeAllowed)
Creates a key set view of a
Database . |
Modifier and Type | Method and Description |
---|---|
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).
|
addAll, containsAll, equals, getIteratorBlockSize, hashCode, iterator, iterator, join, removeAll, retainAll, setIteratorBlockSize, size, storedIterator, storedIterator, toArray, toArray, toList, toString
areDuplicatesAllowed, areDuplicatesOrdered, areKeysRenumbered, clear, getCursorConfig, isDirtyRead, isDirtyReadAllowed, isEmpty, isOrdered, isSecondary, isTransactional, isWriteAllowed
public StoredKeySet(Database database, EntryBinding keyBinding, boolean writeAllowed)
Database
.database
- is the Database 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 DatabaseException
is
thrown.public boolean add(java.lang.Object key)
Set.add(E)
interface.add
in interface java.util.Collection
add
in interface java.util.Set
java.lang.UnsupportedOperationException
- if the collection is indexed, or
if the collection is read-only.RuntimeExceptionWrapper
- if a DatabaseException
is
thrown.public boolean remove(java.lang.Object key)
Set.remove(java.lang.Object)
interface.remove
in interface java.util.Collection
remove
in interface java.util.Set
java.lang.UnsupportedOperationException
- if the collection is read-only.RuntimeExceptionWrapper
- if a DatabaseException
is
thrown.public boolean contains(java.lang.Object key)
Set.contains(java.lang.Object)
interface.contains
in interface java.util.Collection
contains
in interface java.util.Set
RuntimeExceptionWrapper
- if a DatabaseException
is
thrown.