|
Berkeley DB version 5.3.28 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sleepycat.collections.StoredContainer com.sleepycat.collections.StoredCollection<E> com.sleepycat.collections.StoredValueSet<E>
public class StoredValueSet<E>
The Set returned by Map.values() and Map.duplicates(), and which can also be constructed directly if a Map is not needed. Although this collection is a set it may contain duplicate values. Only if an entity value binding is used are all elements guaranteed to be unique.
Field Summary |
---|
Fields inherited from class com.sleepycat.collections.StoredCollection |
---|
DEFAULT_ITERATOR_BLOCK_SIZE |
Constructor Summary | |
---|---|
StoredValueSet(Database database,
EntityBinding<E> valueEntityBinding,
boolean writeAllowed)
Creates a value set entity view of a Database . |
|
StoredValueSet(Database database,
EntryBinding<E> valueBinding,
boolean writeAllowed)
Creates a value set view of a Database . |
Method Summary | |
---|---|
boolean |
add(E entity)
Adds the specified entity to this set if it is not already present (optional operation). |
boolean |
contains(Object value)
Returns true if this set contains the specified element. |
boolean |
remove(Object value)
Removes the specified value from this set if it is present (optional operation). |
Methods inherited from class com.sleepycat.collections.StoredCollection |
---|
addAll, containsAll, equals, getIteratorBlockSize, hashCode, iterator, iterator, join, removeAll, retainAll, setIteratorBlockSize, size, storedIterator, storedIterator, toArray, toArray, toList, toString |
Methods inherited from class com.sleepycat.collections.StoredContainer |
---|
areDuplicatesAllowed, areDuplicatesOrdered, areKeyRangesAllowed, areKeysRenumbered, clear, getCursorConfig, isEmpty, isOrdered, isSecondary, isTransactional, isWriteAllowed |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, 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 StoredValueSet(Database database, EntryBinding<E> valueBinding, boolean writeAllowed)
Database
.
database
- is the Database underlying the new collection.valueBinding
- is the binding used to translate between value
buffers and value objects.writeAllowed
- is true to create a read-write collection or false
to create a read-only collection.
IllegalArgumentException
- if formats are not consistently
defined or a parameter is invalid.
RuntimeExceptionWrapper
- if a checked exception is thrown,
including a DatabaseException
on BDB (C Edition).public StoredValueSet(Database database, EntityBinding<E> valueEntityBinding, boolean writeAllowed)
Database
.
database
- is the Database underlying the new collection.valueEntityBinding
- is the binding used to translate between
key/value buffers and entity value objects.writeAllowed
- is true to create a read-write collection or false
to create a read-only collection.
IllegalArgumentException
- if formats are not consistently
defined or a parameter is invalid.
RuntimeExceptionWrapper
- if a checked exception is thrown,
including a DatabaseException
on BDB (C Edition).Method Detail |
---|
public boolean add(E entity)
Set.add(E)
interface.
add
in interface Collection<E>
add
in interface Set<E>
entity
- is the entity to be added.
UnsupportedOperationException
- if the collection is read-only,
if the collection is indexed, or if an entity binding is not used.
RuntimeExceptionWrapper
- if a checked exception is thrown,
including a DatabaseException
on BDB (C Edition).public boolean contains(Object value)
Set.contains(java.lang.Object)
interface.
contains
in interface Collection<E>
contains
in interface Set<E>
value
- the value to check.
RuntimeExceptionWrapper
- if a checked exception is thrown,
including a DatabaseException
on BDB (C Edition).public boolean remove(Object value)
Set.remove(java.lang.Object)
interface.
remove
in interface Collection<E>
remove
in interface Set<E>
UnsupportedOperationException
- if the collection is read-only.
RuntimeExceptionWrapper
- if a checked exception is thrown,
including a DatabaseException
on BDB (C Edition).
|
Berkeley DB version 5.3.28 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |