public abstract class AbstractTxnCollection<E> extends Object implements TxnCollection<E>
Modifier and Type | Field and Description |
---|---|
protected TxnRefFactory |
defaultRefFactory |
protected Stm |
stm |
Modifier | Constructor and Description |
---|---|
protected |
AbstractTxnCollection(Stm stm) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E item) |
boolean |
addAll(Collection<? extends E> c) |
boolean |
addAll(TxnCollection<? extends E> c)
Adds all of the elements in the specified collection to this collection
(optional operation).
|
boolean |
addAll(Txn tx,
Collection<? extends E> c)
Adds all of the elements in the specified collection to this collection
(optional operation).
|
boolean |
addAll(Txn tx,
TxnCollection<? extends E> c)
Adds all of the elements in the specified collection to this collection
(optional operation).
|
void |
clear() |
boolean |
contains(Object item) |
boolean |
containsAll(Collection<?> c) |
boolean |
containsAll(Txn tx,
Collection<?> c)
Returns true if this collection contains all of the elements
in the specified collection.
|
Stm |
getStm()
Returns the STM that manages this TxnCollection.
|
boolean |
isEmpty() |
boolean |
isEmpty(Txn tx)
Returns true if this collection contains no elements.
|
TxnIterator<E> |
iterator() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, clear, contains, remove, size, toString
iterator
equals, hashCode, parallelStream, removeIf, spliterator, stream
protected final Stm stm
protected final TxnRefFactory defaultRefFactory
protected AbstractTxnCollection(Stm stm)
public Stm getStm()
TxnCollection
getStm
in interface TxnCollection<E>
public boolean isEmpty()
isEmpty
in interface Collection<E>
public boolean isEmpty(Txn tx)
TxnCollection
isEmpty
in interface TxnCollection<E>
tx
- the transaction used for this operation.public int size()
size
in interface Collection<E>
public void clear()
clear
in interface Collection<E>
public boolean contains(Object item)
contains
in interface Collection<E>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E>
public boolean containsAll(Txn tx, Collection<?> c)
TxnCollection
containsAll
in interface TxnCollection<E>
tx
- the transaction used for this operation.c
- collection to be checked for containment in this collectionCollection.contains(Object)
public boolean remove(Object o)
remove
in interface Collection<E>
public boolean add(E item)
add
in interface Collection<E>
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E>
public boolean addAll(Txn tx, Collection<? extends E> c)
TxnCollection
addAll
in interface TxnCollection<E>
tx
- the transaction used for this operation.c
- collection containing elements to be added to this collectionCollection.add(Object)
public boolean addAll(TxnCollection<? extends E> c)
TxnCollection
addAll
in interface TxnCollection<E>
c
- collection containing elements to be added to this collectionCollection.add(Object)
public boolean addAll(Txn tx, TxnCollection<? extends E> c)
TxnCollection
addAll
in interface TxnCollection<E>
c
- collection containing elements to be added to this collectionCollection.add(Object)
public TxnIterator<E> iterator()
iterator
in interface Iterable<E>
iterator
in interface Collection<E>
iterator
in interface TxnIterable<E>
public Object[] toArray()
toArray
in interface Collection<E>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<E>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<E>
Copyright © 2020. All rights reserved.