|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.multiverse.collections.AbstractTxnCollection<E>
org.multiverse.collections.NaiveTxnHashSet<E>
public final class NaiveTxnHashSet<E>
| Field Summary |
|---|
| Fields inherited from class org.multiverse.collections.AbstractTxnCollection |
|---|
defaultRefFactory, stm |
| Constructor Summary | |
|---|---|
NaiveTxnHashSet(Stm stm)
|
|
| Method Summary | |
|---|---|
boolean |
add(Txn tx,
E e)
Ensures that this collection contains the specified element (optional operation). |
void |
clear(Txn tx)
Removes all of the elements from this collection (optional operation). |
boolean |
contains(Object item)
|
boolean |
contains(Txn tx,
Object o)
Returns true if this collection contains the specified element. |
TxnIterator<E> |
iterator(Txn tx)
Returns an iterator over a set of elements of type T. |
boolean |
remove(Object item)
|
boolean |
remove(Txn tx,
Object item)
Removes a single instance of the specified element from this collection, if it is present (optional operation). |
int |
size(Txn tx)
Returns the number of elements in this collection. |
String |
toString(Txn tx)
|
| Methods inherited from class org.multiverse.collections.AbstractTxnCollection |
|---|
add, addAll, addAll, addAll, addAll, clear, containsAll, containsAll, getStm, isEmpty, isEmpty, iterator, removeAll, retainAll, size, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.multiverse.api.collections.TxnCollection |
|---|
addAll, addAll, addAll, containsAll, getStm, isEmpty |
| Methods inherited from interface org.multiverse.api.collections.TxnIterable |
|---|
iterator |
| Methods inherited from interface java.util.Set |
|---|
add, addAll, clear, containsAll, equals, hashCode, isEmpty, iterator, removeAll, retainAll, size, toArray, toArray |
| Constructor Detail |
|---|
public NaiveTxnHashSet(Stm stm)
| Method Detail |
|---|
public boolean add(Txn tx,
E e)
TxnCollectionCollections that support this operation may place limitations on what elements may be added to this collection. In particular, some collections will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. Collection classes should clearly specify in their documentation any restrictions on what elements may be added.
If a collection refuses to add a particular element for any reason other than that it already contains the element, it must throw an exception (rather than returning false). This preserves the invariant that a collection always contains the specified element after this call returns.
add in interface TxnCollection<E>tx - the transaction used for this operation.e - element whose presence in this collection is to be ensured
public boolean contains(Object item)
contains in interface Collection<E>contains in interface Set<E>contains in class AbstractTxnCollection<E>
public boolean contains(Txn tx,
Object o)
TxnCollection
contains in interface TxnCollection<E>tx - the transaction used for this operation.o - element whose presence in this collection is to be tested
public boolean remove(Object item)
remove in interface Collection<E>remove in interface Set<E>remove in class AbstractTxnCollection<E>
public boolean remove(Txn tx,
Object item)
TxnCollection
remove in interface TxnCollection<E>tx - the transaction used for this operation.item - element to be removed from this collection, if present
public int size(Txn tx)
TxnCollection
size in interface TxnCollection<E>tx - the transaction used for this operation.
public void clear(Txn tx)
TxnCollection
clear in interface TxnCollection<E>tx - the transaction used for this operation.public TxnIterator<E> iterator(Txn tx)
TxnIterable
iterator in interface TxnIterable<E>tx - the Txn used for this Operation.
public String toString(Txn tx)
toString in interface TxnCollection<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||