Package rasj.odmg
Class RasList
- java.lang.Object
-
- java.util.AbstractCollection
-
- rasj.odmg.RasCollection
-
- rasj.odmg.RasList
-
- All Implemented Interfaces:
java.lang.Iterable,java.util.Collection,java.util.List,DCollection,DList
public class RasList extends RasCollection implements DList
This class implements the ODMG DList interface.
-
-
Constructor Summary
Constructors Constructor Description RasList()constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, java.lang.Object element)Inserts the specified element at the specified position in this list.booleanadd(java.lang.Object o)Appends the specified element to the end of this List.booleanaddAll(int index, java.util.Collection c)Inserts all of the elements in the specified collection into this list at the specified position.DListconcat(DList otherList)Creates a new DList object that contains the contents of this DList object concatenated with the contents of the otherList object.java.lang.Objectget(int index)Returns the element at the specified position in this list.intindexOf(java.lang.Object o)Returns the index in this list of the first occurence of the specified element, or -1 if the list does not contain this element.java.util.Iteratoriterator()Returns an iterator over the elements in this list in proper sequence.intlastIndexOf(java.lang.Object o)Returns the index in this list of the last occurence of the specified element, or -1 if the list does not contain this element.java.util.ListIteratorlistIterator()Returns a list iterator of the elements in this list (in proper sequence).java.util.ListIteratorlistIterator(int index)Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in the list.java.lang.Objectremove(int index)Removes the element at the specified position in this list.java.lang.Objectset(int index, java.lang.Object element)Replaces the element at the specified position in this list with the specified element.intsize()Returns the number of elements in this List.java.util.ListsubList(int fromIndex, int toIndex)Returns a view of the portion of this list between fromIndex, inclusive, and toIndex, exclusive.-
Methods inherited from class rasj.odmg.RasCollection
existsElement, query, select, selectElement
-
Methods inherited from class java.util.AbstractCollection
addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, 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.odmg.DCollection
existsElement, query, select, selectElement
-
-
-
-
Method Detail
-
concat
public DList concat(DList otherList)
Creates a new DList object that contains the contents of this DList object concatenated with the contents of the otherList object.
-
subList
public java.util.List subList(int fromIndex, int toIndex)Returns a view of the portion of this list between fromIndex, inclusive, and toIndex, exclusive.- Specified by:
subListin interfacejava.util.List
-
listIterator
public java.util.ListIterator listIterator()
Returns a list iterator of the elements in this list (in proper sequence).- Specified by:
listIteratorin interfacejava.util.List
-
iterator
public java.util.Iterator iterator()
Returns an iterator over the elements in this list in proper sequence.- Specified by:
iteratorin interfacejava.util.Collection- Specified by:
iteratorin interfacejava.lang.Iterable- Specified by:
iteratorin interfacejava.util.List- Overrides:
iteratorin classRasCollection
-
listIterator
public java.util.ListIterator listIterator(int index)
Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in the list.- Specified by:
listIteratorin interfacejava.util.List
-
lastIndexOf
public int lastIndexOf(java.lang.Object o)
Returns the index in this list of the last occurence of the specified element, or -1 if the list does not contain this element.- Specified by:
lastIndexOfin interfacejava.util.List
-
indexOf
public int indexOf(java.lang.Object o)
Returns the index in this list of the first occurence of the specified element, or -1 if the list does not contain this element.- Specified by:
indexOfin interfacejava.util.List
-
remove
public java.lang.Object remove(int index)
Removes the element at the specified position in this list.- Specified by:
removein interfacejava.util.List
-
add
public boolean add(java.lang.Object o)
Appends the specified element to the end of this List.- Specified by:
addin interfacejava.util.Collection- Specified by:
addin interfacejava.util.List- Overrides:
addin classjava.util.AbstractCollection
-
add
public void add(int index, java.lang.Object element)Inserts the specified element at the specified position in this list.- Specified by:
addin interfacejava.util.List
-
set
public java.lang.Object set(int index, java.lang.Object element)Replaces the element at the specified position in this list with the specified element.- Specified by:
setin interfacejava.util.List
-
get
public java.lang.Object get(int index)
Returns the element at the specified position in this list.- Specified by:
getin interfacejava.util.List
-
addAll
public boolean addAll(int index, java.util.Collection c)Inserts all of the elements in the specified collection into this list at the specified position.- Specified by:
addAllin interfacejava.util.List
-
size
public int size()
Returns the number of elements in this List.- Specified by:
sizein interfacejava.util.Collection- Specified by:
sizein interfacejava.util.List- Overrides:
sizein classRasCollection
-
-