public class ThreadCursoredList extends Vector
| Constructor and Description |
|---|
ThreadCursoredList()
Construct an empty list so that its internal data array
has size 10 and its standard capacity increment is zero.
|
ThreadCursoredList(int initialCapacity)
Construct an empty list with the specified initial capacity and
with its capacity increment equal to zero.
|
ThreadCursoredList(int initialCapacity,
int capacityIncrement)
Construct an empty list with the specified initial capacity and
capacity increment.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
Object element)
Add and notify any waiters that there are new elements.
|
boolean |
add(Object element)
Add and notify any waiters that there are new elements.
|
boolean |
addAll(Collection collection)
Add and notify any waiters that there are new elements.
|
boolean |
addAll(int index,
Collection collection)
Add and notify any waiters that there are new elements.
|
void |
addElement(Object object)
Add and notify any waiters that there are new elements.
|
void |
clear()
First wait until complete.
|
Object |
clone()
First wait until complete.
|
boolean |
contains(Object element)
If it does not contain the object must wait until it is complete.
|
boolean |
containsAll(Collection collection)
If it does not contain the object must wait until it is complete.
|
void |
copyInto(Object[] array)
First wait until complete.
|
Object |
elementAt(int index)
If the index is beyond the size wait until complete.
|
Enumeration |
elements()
Allow concurrent streaming of the elements.
|
boolean |
equals(Object object)
First wait until complete.
|
Object |
firstElement()
Wait until has an element or is complete.
|
Object |
get(int index)
Wait until has the element or is complete.
|
RuntimeException |
getException()
Return any exception that was throw from concurrent population thread.
|
boolean |
hasException()
Return if any exception that was throw from concurrent population thread.
|
int |
hashCode()
First wait until complete.
|
int |
indexOf(Object element)
If does not contain the object wait until complete.
|
int |
indexOf(Object element,
int index)
If does not contain the object wait until complete.
|
void |
insertElementAt(Object element,
int index)
Add the element a notify any waiters that there are new elements.
|
boolean |
isComplete()
Return if the list is complete.
|
boolean |
isEmpty()
If empty wait until an element has been added or is complete.
|
Iterator |
iterator() |
Object |
lastElement()
First wait until complete.
|
int |
lastIndexOf(Object element)
First wait until complete.
|
int |
lastIndexOf(Object element,
int index)
First wait until complete.
|
ListIterator |
listIterator() |
ListIterator |
listIterator(int index)
Iterate while waiting at end until complete.
|
Object |
remove(int index)
If index is missing wait until is there.
|
boolean |
remove(Object element)
If object is missing wait until complete.
|
boolean |
removeAll(Collection collection)
First wait until complete.
|
void |
removeAllElements()
First wait until complete.
|
boolean |
removeElement(Object element)
If missing wait until complete.
|
void |
removeElementAt(int index)
If index is missing wait until reasched or complete.
|
boolean |
retainAll(Collection collection)
First wait until complete.
|
Object |
set(int index,
Object element)
If index is missing wait until reached or complete.
|
void |
setElementAt(Object element,
int index)
If index is missing wait until reached or complete.
|
void |
setIsComplete(boolean isComplete)
Set the list complete and notify any waiters.
|
int |
size()
First wait until complete.
|
List |
subList(int fromIndex,
int toIndex)
If index is missing wait until reached or complete.
|
void |
throwException(RuntimeException exception)
Record that the population thread hit an exception,
that should be thrown to the processing thread on the next access.
|
Object[] |
toArray()
First wait until complete.
|
Object[] |
toArray(Object[] array)
First wait until complete.
|
String |
toString()
First wait until complete.
|
void |
trimToSize()
First wait until complete.
|
void |
waitUntilAdd()
Wait until a new element has been added.
|
void |
waitUntilComplete()
Wait until the list has been fully populated.
|
capacity, ensureCapacity, forEach, removeIf, replaceAll, setSize, sort, spliteratorparallelStream, streampublic ThreadCursoredList()
public ThreadCursoredList(int initialCapacity)
public ThreadCursoredList(int initialCapacity,
int capacityIncrement)
public void add(int index,
Object element)
public boolean add(Object element)
public boolean addAll(int index,
Collection collection)
public boolean addAll(Collection collection)
public void addElement(Object object)
addElement in class Vectorpublic void clear()
public boolean hasException()
public RuntimeException getException()
public void throwException(RuntimeException exception)
public boolean isComplete()
public void setIsComplete(boolean isComplete)
public void waitUntilComplete()
public void waitUntilAdd()
public boolean contains(Object element)
public boolean containsAll(Collection collection)
containsAll in interface CollectioncontainsAll in interface ListcontainsAll in class Vectorpublic void copyInto(Object[] array)
public Object elementAt(int index)
public Enumeration elements()
public boolean equals(Object object)
public Object firstElement()
firstElement in class Vectorpublic Object get(int index)
public int hashCode()
public int indexOf(Object element)
public int indexOf(Object element, int index)
public void insertElementAt(Object element, int index)
insertElementAt in class Vectorpublic boolean isEmpty()
public Iterator iterator()
public Object lastElement()
lastElement in class Vectorpublic int lastIndexOf(Object element)
lastIndexOf in interface ListlastIndexOf in class Vectorpublic int lastIndexOf(Object element, int index)
lastIndexOf in class Vectorpublic ListIterator listIterator()
listIterator in interface ListlistIterator in class Vectorpublic ListIterator listIterator(int index)
listIterator in interface ListlistIterator in class Vectorpublic Object remove(int index)
public boolean remove(Object element)
public boolean removeAll(Collection collection)
public void removeAllElements()
removeAllElements in class Vectorpublic boolean removeElement(Object element)
removeElement in class Vectorpublic void removeElementAt(int index)
removeElementAt in class Vectorpublic boolean retainAll(Collection collection)
public Object set(int index, Object element)
public void setElementAt(Object element, int index)
setElementAt in class Vectorpublic int size()
public List subList(int fromIndex, int toIndex)
public Object[] toArray()
public void trimToSize()
trimToSize in class VectorEclipseLink 2.6.3, "build v20160428-59c81c5" API Reference