|
|||||||||
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.StoredValueSet
public class StoredValueSet
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.
Constructor Summary | |
---|---|
StoredValueSet(DataIndex index,
DataBinding valueBinding,
boolean writeAllowed)
Creates a value set view of a DataIndex . |
|
StoredValueSet(DataIndex index,
EntityBinding valueEntityBinding,
boolean writeAllowed)
Creates a value set entity view of a DataIndex . |
|
StoredValueSet(DataStore store,
DataBinding valueBinding,
boolean writeAllowed)
Creates a value set view of a DataStore . |
|
StoredValueSet(DataStore store,
EntityBinding valueEntityBinding,
boolean writeAllowed)
Creates a value set entity view of a DataStore . |
Method Summary | |
---|---|
boolean |
add(java.lang.Object entity)
Adds the specified entity to this set if it is not already present (optional operation). |
boolean |
contains(java.lang.Object value)
Returns true if this set contains the specified element. |
boolean |
remove(java.lang.Object value)
Removes the specified value from this set if it is present (optional operation). |
int |
size()
Always throws UnsupportedOperationException. |
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 |
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, toArray, toArray |
Constructor Detail |
---|
public StoredValueSet(DataStore store, DataBinding valueBinding, boolean writeAllowed)
DataStore
.
store
- is the DataStore 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.
java.lang.IllegalArgumentException
- if formats are not consistently
defined or a parameter is invalid.
RuntimeExceptionWrapper
- if a DbException
is thrown.public StoredValueSet(DataStore store, EntityBinding valueEntityBinding, boolean writeAllowed)
DataStore
.
store
- is the DataStore 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.
java.lang.IllegalArgumentException
- if formats are not consistently
defined or a parameter is invalid.
RuntimeExceptionWrapper
- if a DbException
is thrown.public StoredValueSet(DataIndex index, DataBinding valueBinding, boolean writeAllowed)
DataIndex
.
index
- is the DataIndex 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.
java.lang.IllegalArgumentException
- if formats are not consistently
defined or a parameter is invalid.
RuntimeExceptionWrapper
- if a DbException
is thrown.public StoredValueSet(DataIndex index, EntityBinding valueEntityBinding, boolean writeAllowed)
DataIndex
.
index
- is the DataIndex 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.
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 entity)
Set.add(E)
interface.
add
in interface java.util.Collection
add
in interface java.util.Set
entity
- is the entity to be added.
java.lang.UnsupportedOperationException
- if the collection is read-only,
if the collection is indexed, or if an entity binding is not used.
RuntimeExceptionWrapper
- if a DbException
is thrown.public boolean contains(java.lang.Object value)
Set.contains(Object)
interface.
contains
in interface java.util.Collection
contains
in interface java.util.Set
value
- the value to check.
public boolean remove(java.lang.Object value)
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 DbException
is thrown.public int size()
StoredContainer
Collection.size()
and Map.size()
interfaces.
size
in interface java.util.Collection
size
in interface java.util.Set
size
in class StoredContainer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |