|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jade.util.leap.RoundList
Implementation of a RoundList with get/insert methods relative to the current element
Constructor Summary | |
RoundList()
|
Method Summary | |
boolean |
add(java.lang.Object element)
Inserts the element before the current element.
|
boolean |
contains(java.lang.Object element)
Returns true if this list contains the specified element. |
java.lang.Object |
get()
Returns the current element in the list and updates the pointer
such that the current becomes the
next element in the list.
|
Iterator |
iterator()
Returns an Iterator over the elements in this list. |
static void |
main(java.lang.String[] args)
Just for Debugging this implementation. |
boolean |
remove(java.lang.Object element)
Removes the first occurrence of the specified element in this list and updates the pointer to the current element. |
int |
size()
Returns the number of elements in this list. |
java.lang.String |
toString()
Returns a string representation of this collection. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public RoundList()
Method Detail |
public boolean add(java.lang.Object element)
element
before the current element.
If the list was empty, the inserted element becomes also the current element.
Note that this implementation uses a LinkedList
and therefore it is not synchronized.element
- the element to insertpublic java.lang.Object get() throws java.util.NoSuchElementException
element
in the list and updates the pointer
such that the current becomes the
next element in the list.
size()
timespublic boolean remove(java.lang.Object element)
(element==null ? get(i)==null : element.equals(get(i)))
(if such an element exists).element
- the element to be removed from this list, if present.public boolean contains(java.lang.Object element)
(element==null ? e==null : element.equals(e)).
element
- whose presence in this list is to be tested.public int size()
public Iterator iterator()
public java.lang.String toString()
String.valueOf(Object).
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |