|
||||||||||
| 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.NaiveTxnLinkedList<E>
E - public final class NaiveTxnLinkedList<E>
A LinkedList implementation that also acts as a TxnQueue, TxnDeque.
| Field Summary |
|---|
| Fields inherited from class org.multiverse.collections.AbstractTxnCollection |
|---|
defaultRefFactory, stm |
| Constructor Summary | |
|---|---|
NaiveTxnLinkedList(Stm stm)
|
|
NaiveTxnLinkedList(Stm stm,
int capacity)
|
|
| Method Summary | |
|---|---|
boolean |
add(Txn tx,
E e)
Ensures that this collection contains the specified element (optional operation). |
void |
addFirst(E e)
|
void |
addFirst(Txn tx,
E e)
|
void |
addLast(E e)
|
void |
addLast(Txn tx,
E e)
|
void |
clear(Txn tx)
Removes all of the elements from this collection (optional operation). |
boolean |
contains(Txn tx,
Object o)
Returns true if this collection contains the specified element. |
TxnIterator<E> |
descendingIterator()
|
TxnIterator<E> |
descendingIterator(Txn tx)
|
E |
element()
|
E |
element(Txn tx)
|
E |
get(int index)
|
E |
get(Txn tx,
int index)
|
int |
getCapacity()
|
E |
getFirst()
|
E |
getFirst(Txn tx)
|
E |
getLast()
|
E |
getLast(Txn tx)
|
int |
indexOf(Object item)
|
int |
indexOf(Txn tx,
Object item)
|
TxnIterator<E> |
iterator(Txn tx)
Returns an iterator over a set of elements of type T. |
int |
lastIndexOf(Object item)
|
int |
lastIndexOf(Txn tx,
Object item)
|
boolean |
offer(E item)
|
boolean |
offer(Txn tx,
E item)
|
boolean |
offerFirst(E e)
|
boolean |
offerFirst(Txn tx,
E item)
|
boolean |
offerLast(E e)
|
boolean |
offerLast(Txn tx,
E item)
|
E |
peek()
|
E |
peek(Txn tx)
|
E |
peekFirst()
|
E |
peekFirst(Txn tx)
|
E |
peekLast()
|
E |
peekLast(Txn tx)
|
E |
poll()
|
E |
poll(Txn tx)
|
E |
pollFirst()
|
E |
pollFirst(Txn tx)
|
E |
pollLast()
|
E |
pollLast(Txn tx)
|
E |
pop()
|
E |
pop(Txn tx)
|
void |
push(E e)
|
void |
push(Txn tx,
E e)
|
void |
put(E item)
|
void |
put(Txn tx,
E item)
|
void |
putFirst(E item)
|
void |
putFirst(Txn tx,
E item)
|
void |
putLast(E item)
|
void |
putLast(Txn tx,
E item)
|
E |
remove()
|
E |
remove(int index)
|
E |
remove(Txn tx)
|
E |
remove(Txn tx,
int index)
|
boolean |
remove(Txn tx,
Object o)
Removes a single instance of the specified element from this collection, if it is present (optional operation). |
E |
removeFirst()
|
E |
removeFirst(Txn tx)
|
boolean |
removeFirstOccurrence(Object o)
|
boolean |
removeFirstOccurrence(Txn tx,
Object o)
|
E |
removeLast()
|
E |
removeLast(Txn tx)
|
boolean |
removeLastOccurrence(Object o)
|
boolean |
removeLastOccurrence(Txn tx,
Object o)
|
E |
set(int index,
E element)
|
E |
set(Txn tx,
int index,
E element)
|
int |
size(Txn tx)
Returns the number of elements in this collection. |
E |
take()
|
E |
take(Txn tx)
|
E |
takeFirst()
|
E |
takeFirst(Txn tx)
|
E |
takeLast()
|
E |
takeLast(Txn tx)
|
String |
toString(Txn tx)
|
| Methods inherited from class org.multiverse.collections.AbstractTxnCollection |
|---|
add, addAll, addAll, addAll, addAll, clear, contains, containsAll, containsAll, getStm, isEmpty, isEmpty, iterator, remove, 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.Deque |
|---|
add, contains, iterator, remove, size |
| Methods inherited from interface java.util.Collection |
|---|
addAll, clear, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
|---|
public NaiveTxnLinkedList(Stm stm)
public NaiveTxnLinkedList(Stm stm,
int capacity)
| Method Detail |
|---|
public int getCapacity()
getCapacity in interface TxnQueue<E>
public E set(int index,
E element)
set in interface TxnList<E>
public E set(Txn tx,
int index,
E element)
set in interface TxnList<E>public int size(Txn tx)
TxnCollection
size in interface TxnCollection<E>tx - the transaction used for this operation.
public int indexOf(Object item)
indexOf in interface TxnList<E>
public int indexOf(Txn tx,
Object item)
indexOf in interface TxnList<E>public int lastIndexOf(Object item)
lastIndexOf in interface TxnList<E>
public int lastIndexOf(Txn tx,
Object item)
lastIndexOf in interface TxnList<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(Txn tx,
Object o)
TxnCollection
remove in interface TxnCollection<E>tx - the transaction used for this operation.o - element to be removed from this collection, if present
public void clear(Txn tx)
TxnCollection
clear in interface TxnCollection<E>tx - the transaction used for this operation.public E element()
element in interface Deque<E>element in interface Queue<E>public E element(Txn tx)
element in interface TxnQueue<E>public E pop()
pop in interface Deque<E>public E pop(Txn tx)
pop in interface TxnDeque<E>public void push(E e)
push in interface Deque<E>
public void push(Txn tx,
E e)
push in interface TxnDeque<E>public E remove(int index)
remove in interface TxnList<E>
public E remove(Txn tx,
int index)
remove in interface TxnList<E>public E removeFirst()
removeFirst in interface Deque<E>public E removeFirst(Txn tx)
removeFirst in interface TxnDeque<E>public E removeLast()
removeLast in interface Deque<E>public E removeLast(Txn tx)
removeLast in interface TxnDeque<E>public E remove()
remove in interface Deque<E>remove in interface Queue<E>public E remove(Txn tx)
remove in interface TxnQueue<E>public boolean removeFirstOccurrence(Object o)
removeFirstOccurrence in interface Deque<E>
public boolean removeFirstOccurrence(Txn tx,
Object o)
removeFirstOccurrence in interface TxnDeque<E>public boolean removeLastOccurrence(Object o)
removeLastOccurrence in interface Deque<E>
public boolean removeLastOccurrence(Txn tx,
Object o)
removeLastOccurrence in interface TxnDeque<E>public E getFirst()
getFirst in interface Deque<E>public E getFirst(Txn tx)
getFirst in interface TxnDeque<E>public E getLast()
getLast in interface Deque<E>public E getLast(Txn tx)
getLast in interface TxnDeque<E>public E get(int index)
get in interface TxnList<E>
public E get(Txn tx,
int index)
get in interface TxnList<E>public void addFirst(E e)
addFirst in interface Deque<E>
public void addFirst(Txn tx,
E e)
addFirst in interface TxnDeque<E>public void addLast(E e)
addLast in interface Deque<E>
public void addLast(Txn tx,
E e)
addLast in interface TxnDeque<E>
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 void putFirst(E item)
putFirst in interface TxnDeque<E>
public void putFirst(Txn tx,
E item)
putFirst in interface TxnDeque<E>public void put(E item)
put in interface TxnQueue<E>
public void put(Txn tx,
E item)
put in interface TxnQueue<E>public void putLast(E item)
putLast in interface TxnDeque<E>
public void putLast(Txn tx,
E item)
putLast in interface TxnDeque<E>public E take()
take in interface TxnQueue<E>public E take(Txn tx)
take in interface TxnQueue<E>public E takeFirst()
takeFirst in interface TxnDeque<E>public E takeFirst(Txn tx)
takeFirst in interface TxnDeque<E>public E takeLast()
takeLast in interface TxnDeque<E>public E takeLast(Txn tx)
takeLast in interface TxnDeque<E>public boolean offerFirst(E e)
offerFirst in interface Deque<E>
public boolean offerFirst(Txn tx,
E item)
offerFirst in interface TxnDeque<E>public boolean offerLast(E e)
offerLast in interface Deque<E>
public boolean offerLast(Txn tx,
E item)
offerLast in interface TxnDeque<E>public boolean offer(E item)
offer in interface Deque<E>offer in interface Queue<E>
public boolean offer(Txn tx,
E item)
offer in interface TxnQueue<E>public E pollFirst()
pollFirst in interface Deque<E>public E pollFirst(Txn tx)
pollFirst in interface TxnDeque<E>public E pollLast()
pollLast in interface Deque<E>public E pollLast(Txn tx)
pollLast in interface TxnDeque<E>public E poll()
poll in interface Deque<E>poll in interface Queue<E>public E poll(Txn tx)
poll in interface TxnQueue<E>public E peekFirst()
peekFirst in interface Deque<E>public E peekFirst(Txn tx)
peekFirst in interface TxnDeque<E>public E peekLast()
peekLast in interface Deque<E>public E peekLast(Txn tx)
peekLast in interface TxnDeque<E>public E peek()
peek in interface Deque<E>peek in interface Queue<E>public E peek(Txn tx)
peek in interface TxnQueue<E>public TxnIterator<E> iterator(Txn tx)
TxnIterable
iterator in interface TxnIterable<E>tx - the Txn used for this Operation.
public TxnIterator<E> descendingIterator()
descendingIterator in interface Deque<E>public TxnIterator<E> descendingIterator(Txn tx)
descendingIterator in interface TxnDeque<E>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 | |||||||||