|
Jadex 0.941 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.AbstractSequentialList
java.util.LinkedList
jadex.util.collection.SortedList
A sorted list allowing duplicates of elements (unlike java.util.TreeSet). The list is kept sorted, while elements are being added.
Constructor Summary | |
SortedList()
Constructs an empty list with ascending order. |
|
SortedList(boolean ascending)
Constructs an empty list with given order. |
|
SortedList(Comparator comp,
boolean ascending)
Constructs an empty list with given order. |
Method Summary | |
void |
add(int index,
Object element)
Inserts the specified element at the specified position in this list. |
boolean |
add(Object o)
Appends the specified element to the end of this list. |
boolean |
addAll(Collection c)
Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator. |
boolean |
addAll(int index,
Collection c)
Inserts all of the elements in the specified collection into this list, starting at the specified position. |
void |
addFirst(Object o)
Inserts the given element at the beginning of this list. |
void |
addLast(Object o)
Appends the given element to the end of this list. |
int |
insertElement(int index,
Object obj)
Insert an element into the list. |
Methods inherited from class java.util.LinkedList |
clear, clone, contains, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, remove, remove, removeFirst, removeLast, set, size, toArray, toArray |
Methods inherited from class java.util.AbstractSequentialList |
iterator |
Methods inherited from class java.util.AbstractList |
equals, hashCode, listIterator, subList |
Methods inherited from class 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 java.util.List |
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList |
Constructor Detail |
public SortedList()
public SortedList(boolean ascending)
ascending
- True, if the list shoudl sort ascending.public SortedList(Comparator comp, boolean ascending)
comp
- A comparator to use for comparing elements.ascending
- True, if the list shoudl sort ascending.Method Detail |
public void addFirst(Object o)
o
- the element to be inserted at the beginning of this list.public void addLast(Object o)
o
- the element to be inserted at the end of this list.public boolean add(Object o)
o
- element to be appended to this list.
public boolean addAll(Collection c)
c
- the elements to be inserted into this list.
NullPointerException
- if the specified collection is null.public boolean addAll(int index, Collection c)
index
- index at which to insert first element
from the specified collection.c
- elements to be inserted into this list.
IndexOutOfBoundsException
- if the specified index is out of
range (index < 0 || index > size()).
NullPointerException
- if the specified collection is null.public void add(int index, Object element)
index
- index at which the specified element is to be inserted.element
- element to be inserted.
IndexOutOfBoundsException
- if the specified index is out of
range (index < 0 || index > size()).public int insertElement(int index, Object obj)
index
- The index where to start insertion.obj
- The element to insert.
|
Jadex 0.941 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (C) 2002-2005 Lars Braubach, Alexander Pokahr, Andrzej Walczak - University of Hamburg. Use is subject to license terms.