| java.lang.Object com.sleepycat.collections.StoredContainer com.sleepycat.collections.StoredCollection com.sleepycat.collections.StoredValueSet
All known Subclasses: com.sleepycat.collections.StoredSortedValueSet,
StoredValueSet | public class StoredValueSet extends StoredCollection implements Set(Code) | | 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.
author: Mark Hayes |
Method Summary | |
public boolean | add(Object entity) Adds the specified entity to this set if it is not already present
(optional operation).
This method conforms to the
Set.add interface.
Parameters: entity - is the entity to be added. | public boolean | contains(Object value) Returns true if this set contains the specified element.
This method conforms to the
java.util.Set.contains interface.
Parameters: value - the value to check. | boolean | hasValues() | Object | makeIteratorData(BaseIterator iterator, DatabaseEntry keyEntry, DatabaseEntry priKeyEntry, DatabaseEntry valueEntry) | public boolean | remove(Object value) Removes the specified value from this set if it is present (optional
operation).
If an entity binding is used, the key-value pair represented by the
given entity is removed. |
StoredValueSet | public StoredValueSet(Database database, EntryBinding valueBinding, boolean writeAllowed)(Code) | | Creates a value set view of a
Database .
Parameters: database - is the Database underlying the new collection. Parameters: valueBinding - is the binding used to translate between valuebuffers and value 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. |
StoredValueSet | public StoredValueSet(Database database, EntityBinding valueEntityBinding, boolean writeAllowed)(Code) | | Creates a value set entity view of a
Database .
Parameters: database - is the Database underlying the new collection. Parameters: valueEntityBinding - is the binding used to translate betweenkey/value buffers and entity value 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 entity)(Code) | | Adds the specified entity to this set if it is not already present
(optional operation).
This method conforms to the
Set.add interface.
Parameters: entity - is the entity to be added. true if the entity was added, that is the key-value pairrepresented 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. throws: RuntimeExceptionWrapper - if a DatabaseException isthrown. |
contains | public boolean contains(Object value)(Code) | | Returns true if this set contains the specified element.
This method conforms to the
java.util.Set.contains interface.
Parameters: value - the value to check. whether the set contains the given value. |
hasValues | boolean hasValues()(Code) | | |
remove | public boolean remove(Object value)(Code) | | Removes the specified value from this set if it is present (optional
operation).
If an entity binding is used, the key-value pair represented by the
given entity is removed. If an entity binding is used, the first
occurrence of a key-value pair with the given value is removed.
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)
|
|
|