Package rasj.odmg

Class RasList

All Implemented Interfaces:
Iterable, Collection, List, SequencedCollection, DCollection, DList

public class RasList extends RasCollection implements DList
This class implements the ODMG DList interface.
  • Constructor Details

    • RasList

      public RasList()
      constructor
  • Method Details

    • 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.
      Specified by:
      concat in interface DList
      Parameters:
      otherList - The list whose elements are placed at the end of the list returned by this method.
      Returns:
      A new DList that is the concatenation of this list and the list referenced by otherList.
    • subList

      public List subList(int fromIndex, int toIndex)
      Returns a view of the portion of this list between fromIndex, inclusive, and toIndex, exclusive.
      Specified by:
      subList in interface List
    • listIterator

      public ListIterator listIterator()
      Returns a list iterator of the elements in this list (in proper sequence).
      Specified by:
      listIterator in interface List
    • iterator

      public Iterator iterator()
      Returns an iterator over the elements in this list in proper sequence.
      Specified by:
      iterator in interface Collection
      Specified by:
      iterator in interface Iterable
      Specified by:
      iterator in interface List
      Overrides:
      iterator in class RasCollection
    • listIterator

      public 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:
      listIterator in interface List
    • lastIndexOf

      public int lastIndexOf(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:
      lastIndexOf in interface List
    • indexOf

      public int indexOf(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:
      indexOf in interface List
    • remove

      public Object remove(int index)
      Removes the element at the specified position in this list.
      Specified by:
      remove in interface List
    • add

      public boolean add(Object o)
      Appends the specified element to the end of this List.
      Specified by:
      add in interface Collection
      Specified by:
      add in interface List
      Overrides:
      add in class AbstractCollection
    • add

      public void add(int index, Object element)
      Inserts the specified element at the specified position in this list.
      Specified by:
      add in interface List
    • set

      public Object set(int index, Object element)
      Replaces the element at the specified position in this list with the specified element.
      Specified by:
      set in interface List
    • get

      public Object get(int index)
      Returns the element at the specified position in this list.
      Specified by:
      get in interface List
    • addAll

      public boolean addAll(int index, Collection c)
      Inserts all of the elements in the specified collection into this list at the specified position.
      Specified by:
      addAll in interface List
    • size

      public int size()
      Returns the number of elements in this List.
      Specified by:
      size in interface Collection
      Specified by:
      size in interface List
      Overrides:
      size in class RasCollection