public class StoredValueSet<E> extends StoredCollection<E> implements java.util.Set<E>
DEFAULT_ITERATOR_BLOCK_SIZE
view
Constructor and Description |
---|
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 . |
StoredValueSet(DataView valueSetView) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E 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.
|
(package private) boolean |
hasValues() |
(package private) E |
makeIteratorData(BaseIterator iterator,
DatabaseEntry keyEntry,
DatabaseEntry priKeyEntry,
DatabaseEntry valueEntry) |
boolean |
remove(java.lang.Object value)
Removes the specified value from this set if it is present (optional
operation).
|
add, addAll, blockIterator, checkIterAddAllowed, containsAll, equals, getFirstOrLast, getIndexOffset, getIteratorBlockSize, hashCode, iterateDuplicates, iterator, iterator, join, makeIteratorData, removeAll, retainAll, setIteratorBlockSize, size, storedIterator, storedIterator, toArray, toArray, toList, toString
areDuplicatesAllowed, areDuplicatesOrdered, areKeyRangesAllowed, areKeysRenumbered, beginAutoCommit, clear, closeCursor, commitAutoCommit, configuredClone, containsKey, containsValue, convertException, getCursorConfig, getValue, handleException, initAfterClone, isEmpty, isOrdered, isSecondary, isTransactional, isWriteAllowed, putKeyValue, removeKey, removeValue, storedOrExternalIterator
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.java.lang.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.java.lang.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).StoredValueSet(DataView valueSetView)
public boolean add(E entity)
Set.add(E)
interface.add
in interface java.util.Collection<E>
add
in interface java.util.Set<E>
entity
- is the entity to be added.OperationFailureException
- if one of the Write
Operation Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.
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 checked exception is thrown,
including a DatabaseException
on BDB (C Edition).public boolean contains(java.lang.Object value)
Set.contains(java.lang.Object)
interface.contains
in interface java.util.Collection<E>
contains
in interface java.util.Set<E>
value
- the value to check.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.
RuntimeExceptionWrapper
- if a checked exception is thrown,
including a DatabaseException
on BDB (C Edition).public boolean remove(java.lang.Object value)
Set.remove(java.lang.Object)
interface.
remove
in interface java.util.Collection<E>
remove
in interface java.util.Set<E>
OperationFailureException
- if one of the Write
Operation Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.
java.lang.UnsupportedOperationException
- if the collection is read-only.RuntimeExceptionWrapper
- if a checked exception is thrown,
including a DatabaseException
on BDB (C Edition).E makeIteratorData(BaseIterator iterator, DatabaseEntry keyEntry, DatabaseEntry priKeyEntry, DatabaseEntry valueEntry)
makeIteratorData
in class StoredCollection<E>
boolean hasValues()
hasValues
in class StoredCollection<E>
Copyright (c) 2004-2012 Oracle. All rights reserved.