com.sleepycat.collections
public class StoredValueSet extends StoredCollection implements Set
Constructor Summary | |
---|---|
StoredValueSet(Database database, EntryBinding valueBinding, boolean writeAllowed)
Creates a value set view of a Database.
| |
StoredValueSet(Database database, EntityBinding valueEntityBinding, boolean writeAllowed)
Creates a value set entity view of a Database.
|
Method Summary | |
---|---|
boolean | add(Object 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).
|
Parameters: 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.
Throws: IllegalArgumentException if formats are not consistently defined or a parameter is invalid. RuntimeExceptionWrapper if a DatabaseException is thrown.
Parameters: 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.
Throws: IllegalArgumentException if formats are not consistently defined or a parameter is invalid. RuntimeExceptionWrapper if a DatabaseException is thrown.
Parameters: entity is the entity to be added.
Returns: true if the entity was added, that is the key-value pair represented by the entity was not previously present in the collection.
Throws: UnsupportedOperationException if the collection is read-only, if the collection is indexed, or if an entity binding is not used. RuntimeExceptionWrapper if a DatabaseException is thrown.
Parameters: value the value to check.
Returns: whether the set contains the given value.
Throws: UnsupportedOperationException if the collection is read-only. RuntimeExceptionWrapper if a DatabaseException is thrown.