|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList
oracle.javatools.buffer.SafeArrayList
public final class SafeArrayList
The SafeArrayList is an array List
implementation that provides basic thread-safety by implementing
a copy-on-write scheme. Because of this, fetching an
Iterator or ListIterator would
return a snapshot of the list data at the time the iterators
were fetched.
Although this class is declared public, it is part of the implementation, and not part of the published API.
| Nested Class Summary | |
|---|---|
protected static class |
SafeArrayList.SafeListIterator
A list iterator implementation based on a static array. |
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
SafeArrayList()
Construct an empty list. |
|
SafeArrayList(java.util.Collection c)
Construct a list containing the elements of the specified collection in the order that they are returned by the collections iterator. |
|
| Method Summary | |
|---|---|
void |
add(int index,
java.lang.Object element)
Inserts the given element at the given position in this list, shifting any element down. |
boolean |
add(java.lang.Object element)
Adds (append) the given element to the end of our list. |
boolean |
addAll(java.util.Collection c)
Adds (appends) all of the elements in the given collection to the end of this list. |
boolean |
addAll(int index,
java.util.Collection c)
Inserts all of the elements of the given collection to this list at the specified index. |
void |
clear()
Empties this list. |
java.lang.Object |
clone()
Returns a shallow copy of this list instance. |
boolean |
contains(java.lang.Object element)
Fetch whether the given object is contained in this list. |
java.lang.Object |
get(int index)
Fetch the element at the specified position in this list |
int |
indexOf(java.lang.Object element)
Search for the first occurrence of the given argument, testing for equality using the equals() method. |
boolean |
isEmpty()
Tests if this list is empty. |
java.util.Iterator |
iterator()
Returns an iterator over the elements in this list in proper sequence. |
int |
lastIndexOf(java.lang.Object element)
Search for the last occurrence of the given argument in the list. |
java.util.ListIterator |
listIterator()
Returns a list iterator of the elements in this list in proper sequnce. |
java.util.ListIterator |
listIterator(int index)
Returns a list iterator of the elements in this list in proper sequence, starting at the given index. |
java.lang.Object |
remove(int index)
Removes the element at the specified position in this list. |
boolean |
remove(java.lang.Object element)
Removes a single instance of the specified element from this collection. |
boolean |
removeAll(java.util.Collection c)
This operation is not supported by this list implementation. |
protected void |
removeRange(int startIndex,
int endIndex)
Removes from this list all of the elements between the given indexes. |
boolean |
retainAll(java.util.Collection c)
This operation is not supported by this list implementation. |
java.lang.Object |
set(int index,
java.lang.Object element)
Replace the element at the specified position in this list with the specified element |
int |
size()
Fetch the number of elements in this list. |
java.util.List |
subList(int startIndex,
int endIndex)
This operation is not supported by this list implementation. |
java.lang.Object[] |
toArray()
Return an array containing all of the elements in the list in the same order. |
java.lang.Object[] |
toArray(java.lang.Object[] array)
Return an array containing all of the elements in this list in the same order. |
java.lang.String |
toString()
Fetch a visible representation of this object. |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll |
| Constructor Detail |
|---|
public SafeArrayList()
public SafeArrayList(java.util.Collection c)
| Method Detail |
|---|
public int size()
size in interface java.util.Collectionsize in interface java.util.Listsize in class java.util.AbstractCollectionpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.ListisEmpty in class java.util.AbstractCollectionpublic boolean contains(java.lang.Object element)
contains in interface java.util.Collectioncontains in interface java.util.Listcontains in class java.util.AbstractCollectionelement - the element to check
public int indexOf(java.lang.Object element)
equals() method.
indexOf in interface java.util.ListindexOf in class java.util.AbstractListelement - the element to check
public int lastIndexOf(java.lang.Object element)
lastIndexOf in interface java.util.ListlastIndexOf in class java.util.AbstractListelement - the element to check
public java.lang.Object clone()
clone in class java.lang.ObjectSafeArrayList instancepublic java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.ListtoArray in class java.util.AbstractCollectionpublic java.lang.Object[] toArray(java.lang.Object[] array)
toArray in interface java.util.CollectiontoArray in interface java.util.ListtoArray in class java.util.AbstractCollectionarray - the array into which to store the elements of the
list (if it is big enough)
public java.lang.Object get(int index)
get in interface java.util.Listget in class java.util.AbstractListindex - the index of the element to return
public java.lang.Object set(int index,
java.lang.Object element)
set in interface java.util.Listset in class java.util.AbstractListindex - the index of the element to replaceelement - the replacement element
public boolean add(java.lang.Object element)
add in interface java.util.Collectionadd in interface java.util.Listadd in class java.util.AbstractListelement - the element to add
public void add(int index,
java.lang.Object element)
add in interface java.util.Listadd in class java.util.AbstractListindex - the index at which to insert the elementelement - the element to insertpublic boolean remove(java.lang.Object element)
remove in interface java.util.Collectionremove in interface java.util.Listremove in class java.util.AbstractCollectionelement - the element to be removed
public java.lang.Object remove(int index)
remove in interface java.util.Listremove in class java.util.AbstractListindex - the index of the element to remove
public void clear()
clear in interface java.util.Collectionclear in interface java.util.Listclear in class java.util.AbstractListpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.CollectionaddAll in interface java.util.ListaddAll in class java.util.AbstractCollectionc - the elements to be appended to this list
public boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.ListaddAll in class java.util.AbstractListindex - the location in which to insert the new elementsc - the collection to add to our list
public boolean removeAll(java.util.Collection c)
removeAll in interface java.util.CollectionremoveAll in interface java.util.ListremoveAll in class java.util.AbstractCollectionpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.CollectionretainAll in interface java.util.ListretainAll in class java.util.AbstractCollection
protected void removeRange(int startIndex,
int endIndex)
removeRange in class java.util.AbstractListstartIndex - the index to start the removal from (inclusive)endIndex - the index to end the removal at (exclusive)public java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Listiterator in class java.util.AbstractListpublic java.util.ListIterator listIterator()
listIterator in interface java.util.ListlistIterator in class java.util.AbstractListpublic java.util.ListIterator listIterator(int index)
listIterator in interface java.util.ListlistIterator in class java.util.AbstractListindex - the index to start from
public java.util.List subList(int startIndex,
int endIndex)
subList in interface java.util.ListsubList in class java.util.AbstractListpublic java.lang.String toString()
toString in class java.util.AbstractCollection
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||