Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adfnmc.java.util
Class AbstractSequentialList

java.lang.Object
  extended by oracle.adfnmc.java.util.AbstractCollection
      extended by oracle.adfnmc.java.util.AbstractList
          extended by oracle.adfnmc.java.util.AbstractSequentialList
All Implemented Interfaces:
Iterable, Collection, List
Direct Known Subclasses:
LinkedList

public abstract class AbstractSequentialList
extends AbstractList

AbstractSequentialList is an abstract implementation of the List interface. This implementation does not support adding. A subclass must implement the abstract method listIterator().

Since:
1.2

Field Summary
 
Fields inherited from class oracle.adfnmc.java.util.AbstractList
modCount
 
Constructor Summary
protected AbstractSequentialList()
          Constructs a new instance of this AbstractSequentialList.
 
Method Summary
 void add(int location, java.lang.Object object)
          Inserts the specified object into this List at the specified location.
 boolean addAll(int location, Collection collection)
          Inserts the objects in the specified Collection at the specified location in this List.
 java.lang.Object get(int location)
          Answers the element at the specified location in this List.
 Iterator iterator()
          Answers an Iterator on the elements of this List.
abstract  ListIterator listIterator(int location)
          Answers a ListIterator on the elements of this List.
 java.lang.Object remove(int location)
          Removes the object at the specified location from this List.
 java.lang.Object set(int location, java.lang.Object object)
          Replaces the element at the specified location in this List with the specified object.
 
Methods inherited from class oracle.adfnmc.java.util.AbstractList
add, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList
 
Methods inherited from class oracle.adfnmc.java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.adfnmc.java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray
 
Methods inherited from interface oracle.adfnmc.java.util.Collection
toArray
 

Constructor Detail

AbstractSequentialList

protected AbstractSequentialList()
Constructs a new instance of this AbstractSequentialList.

Method Detail

add

public void add(int location,
                java.lang.Object object)
Inserts the specified object into this List at the specified location. The object is inserted before any previous element at the specified location. If the location is equal to the size of this List, the object is added at the end.

Specified by:
add in interface List
Overrides:
add in class AbstractList
Parameters:
location - the index at which to insert
object - the object to add
Throws:
java.lang.UnsupportedOperationException - when adding to this List is not supported
java.lang.ClassCastException - when the class of the object is inappropriate for this List
java.lang.IllegalArgumentException - when the object cannot be added to this List
java.lang.IndexOutOfBoundsException - when location < 0 || >= size()
java.lang.NullPointerException - when the object is null and this List does not support null elements

addAll

public boolean addAll(int location,
                      Collection collection)
Inserts the objects in the specified Collection at the specified location in this List. The objects are added in the order they are returned from the Collection iterator.

Specified by:
addAll in interface List
Overrides:
addAll in class AbstractList
Parameters:
location - the index at which to insert
collection - the Collection of objects
Returns:
true if this List is modified, false otherwise
Throws:
java.lang.UnsupportedOperationException - when adding to this List is not supported
java.lang.ClassCastException - when the class of an object is inappropriate for this List
java.lang.IllegalArgumentException - when an object cannot be added to this List
java.lang.IndexOutOfBoundsException - when location < 0 || >= size()

get

public java.lang.Object get(int location)
Answers the element at the specified location in this List.

Specified by:
get in interface List
Specified by:
get in class AbstractList
Parameters:
location - the index of the element to return
Returns:
the element at the specified location
Throws:
java.lang.IndexOutOfBoundsException - when location < 0 || >= size()

iterator

public Iterator iterator()
Answers an Iterator on the elements of this List. The elements are iterated in the same order that they occur in the List.

Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection
Specified by:
iterator in interface List
Overrides:
iterator in class AbstractList
Returns:
an Iterator on the elements of this List
See Also:
Iterator

listIterator

public abstract ListIterator listIterator(int location)
Answers a ListIterator on the elements of this List. The elements are iterated in the same order that they occur in the List. The iteration starts at the specified location.

Specified by:
listIterator in interface List
Overrides:
listIterator in class AbstractList
Parameters:
location - the index at which to start the iteration
Returns:
a ListIterator on the elements of this List
Throws:
java.lang.IndexOutOfBoundsException - when location < 0 || >= size()
See Also:
ListIterator

remove

public java.lang.Object remove(int location)
Removes the object at the specified location from this List.

Specified by:
remove in interface List
Overrides:
remove in class AbstractList
Parameters:
location - the index of the object to remove
Returns:
the removed object
Throws:
java.lang.UnsupportedOperationException - when removing from this List is not supported
java.lang.IndexOutOfBoundsException - when location < 0 || >= size()

set

public java.lang.Object set(int location,
                            java.lang.Object object)
Replaces the element at the specified location in this List with the specified object.

Specified by:
set in interface List
Overrides:
set in class AbstractList
Parameters:
location - the index at which to put the specified object
object - the object to add
Returns:
the previous element at the index
Throws:
java.lang.UnsupportedOperationException - when replacing elements in this List is not supported
java.lang.ClassCastException - when the class of an object is inappropriate for this List
java.lang.IllegalArgumentException - when an object cannot be added to this List
java.lang.IndexOutOfBoundsException - when location < 0 || >= size()

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.