|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.adfnmc.java.util.AbstractCollection
oracle.adfnmc.java.util.AbstractList
oracle.adfnmc.java.util.AbstractSequentialList
oracle.adfnmc.java.util.LinkedList
public class LinkedList
LinkedList is an implementation of List, backed by a linked list. All optional operations are supported, adding, removing and replacing. The elements can be any objects.
Field Summary |
---|
Fields inherited from class oracle.adfnmc.java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
LinkedList()
Constructs a new empty instance of LinkedList. |
|
LinkedList(Collection collection)
Constructs a new instance of LinkedList that holds all of the elements contained in the supplied
collection argument. |
Method Summary | |
---|---|
void |
add(int location,
java.lang.Object object)
Inserts the specified object into this LinkedList at the specified location. |
boolean |
add(java.lang.Object object)
Adds the specified object at the end of this LinkedList. |
boolean |
addAll(Collection collection)
Adds the objects in the specified Collection to this LinkedList. |
boolean |
addAll(int location,
Collection collection)
Inserts the objects in the specified Collection at the specified location in this LinkedList. |
void |
addFirst(java.lang.Object object)
Adds the specified object at the beginning of this LinkedList. |
void |
addLast(java.lang.Object object)
Adds the specified object at the end of this LinkedList. |
void |
clear()
Removes all elements from this LinkedList, leaving it empty. |
java.lang.Object |
clone()
Answers a new LinkedList with the same elements and size as this LinkedList. |
boolean |
contains(java.lang.Object object)
Searches this LinkedList for the specified object. |
java.lang.Object |
element()
Gets but not removes the element in the head of the queue. |
java.lang.Object |
get(int location)
Answers the element at the specified location in this List. |
java.lang.Object |
getFirst()
Answers the first element in this LinkedList. |
java.lang.Object |
getLast()
Answers the last element in this LinkedList. |
int |
indexOf(java.lang.Object object)
Searches this LinkedList for the specified object and returns the index of the first occurrence. |
int |
lastIndexOf(java.lang.Object object)
Searches this LinkedList for the specified object and returns the index of the last occurrence. |
ListIterator |
listIterator(int location)
Answers a ListIterator on the elements of this LinkedList. |
boolean |
offer(java.lang.Object o)
Inserts the specified element into the queue provided that the condition allows such an operation. |
java.lang.Object |
peek()
Gets but not removes the element in the head of the queue, or throws exception if there is no element in the queue. |
java.lang.Object |
poll()
Gets and removes the element in the head of the queue, or returns null if there is no element in the queue. |
java.lang.Object |
remove()
Gets and removes the element in the head of the queue. |
java.lang.Object |
remove(int location)
Removes the object at the specified location from this LinkedList. |
boolean |
remove(java.lang.Object object)
Removes the first occurrence of the specified object from this Collection. |
java.lang.Object |
removeFirst()
Removes the first object from this LinkedList. |
java.lang.Object |
removeLast()
Removes the last object from this LinkedList. |
java.lang.Object |
set(int location,
java.lang.Object object)
Replaces the element at the specified location in this LinkedList with the specified object. |
int |
size()
Answers the number of elements in this LinkedList. |
java.lang.Object[] |
toArray()
Answers a new array containing all elements contained in this LinkedList. |
java.lang.Object[] |
toArray(java.lang.Object[] contents)
Answers an array containing all elements contained in this LinkedList. |
Methods inherited from class oracle.adfnmc.java.util.AbstractSequentialList |
---|
iterator |
Methods inherited from class oracle.adfnmc.java.util.AbstractList |
---|
equals, hashCode, listIterator, removeRange, subList |
Methods inherited from class oracle.adfnmc.java.util.AbstractCollection |
---|
containsAll, isEmpty, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.adfnmc.java.util.List |
---|
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList |
Constructor Detail |
---|
public LinkedList()
public LinkedList(Collection collection)
LinkedList
that holds all of the elements contained in the supplied
collection
argument. The order of the elements in this new LinkedList
will be determined
by the iteration order of collection
.
collection
- the collection of elements to addMethod Detail |
---|
public void add(int location, java.lang.Object object)
add
in interface List
add
in class AbstractSequentialList
location
- the index at which to insertobject
- the object to add
java.lang.IndexOutOfBoundsException
- when location < 0 || >= size()
public boolean add(java.lang.Object object)
add
in interface Collection
add
in interface List
add
in class AbstractList
object
- the object to add
public boolean addAll(int location, Collection collection)
Collection
iterator.
addAll
in interface List
addAll
in class AbstractSequentialList
location
- the index at which to insertcollection
- the Collection of objects
java.lang.IndexOutOfBoundsException
- when location < 0 || > size()
public boolean addAll(Collection collection)
addAll
in interface Collection
addAll
in interface List
addAll
in class AbstractCollection
collection
- the Collection of objects
public void addFirst(java.lang.Object object)
object
- the object to addpublic void addLast(java.lang.Object object)
object
- the object to addpublic void clear()
clear
in interface Collection
clear
in interface List
clear
in class AbstractList
List.isEmpty()
,
size
public java.lang.Object clone()
Cloneable
public boolean contains(java.lang.Object object)
contains
in interface Collection
contains
in interface List
contains
in class AbstractCollection
object
- the object to search for
object
is an element of this LinkedList, false otherwisepublic java.lang.Object get(int location)
AbstractSequentialList
get
in interface List
get
in class AbstractSequentialList
location
- the index of the element to return
public java.lang.Object getFirst()
java.util.NoSuchElementException
- when this LinkedList is emptypublic java.lang.Object getLast()
java.util.NoSuchElementException
- when this LinkedList is emptypublic int indexOf(java.lang.Object object)
indexOf
in interface List
indexOf
in class AbstractList
object
- the object to search for
public int lastIndexOf(java.lang.Object object)
lastIndexOf
in interface List
lastIndexOf
in class AbstractList
object
- the object to search for
public ListIterator listIterator(int location)
listIterator
in interface List
listIterator
in class AbstractSequentialList
location
- the index at which to start the iteration
java.lang.IndexOutOfBoundsException
- when location < 0 || >= size()
ListIterator
public java.lang.Object remove(int location)
remove
in interface List
remove
in class AbstractSequentialList
location
- the index of the object to remove
java.lang.IndexOutOfBoundsException
- when location < 0 || >= size()
public boolean remove(java.lang.Object object)
AbstractCollection
remove
in interface Collection
remove
in interface List
remove
in class AbstractCollection
object
- the object to remove
public java.lang.Object removeFirst()
java.util.NoSuchElementException
- when this LinkedList is emptypublic java.lang.Object removeLast()
java.util.NoSuchElementException
- when this LinkedList is emptypublic java.lang.Object set(int location, java.lang.Object object)
set
in interface List
set
in class AbstractSequentialList
location
- the index at which to put the specified objectobject
- the object to add
java.lang.IndexOutOfBoundsException
- when location < 0 || >= size()
public int size()
size
in interface Collection
size
in interface List
size
in class AbstractCollection
public boolean offer(java.lang.Object o)
Queue
offer
in interface Queue
o
- the specified element to insert into the queue.
public java.lang.Object poll()
Queue
poll
in interface Queue
public java.lang.Object remove()
Queue
remove
in interface Queue
public java.lang.Object peek()
Queue
peek
in interface Queue
public java.lang.Object element()
Queue
element
in interface Queue
public java.lang.Object[] toArray()
toArray
in interface Collection
toArray
in interface List
toArray
in class AbstractCollection
public java.lang.Object[] toArray(java.lang.Object[] contents)
toArray
in interface Collection
toArray
in class AbstractCollection
contents
- the array
java.lang.ArrayStoreException
- when the type of an element in this LinkedList cannot be stored in the type of the specified array
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |