|
BRUtil - Making Java a Kinder, Gentler, Place to be. |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
An interface for methods common to any sequence of elements. Organizes objects in a linear fashion. Maintains the order of insertion inside the data structure.
| Method Summary | |
void |
append(java.lang.Object o)
Appends given element to the end of the list. |
void |
clear()
Removes all elements from the list. |
java.lang.Object |
getFirst()
Returns the element at the beginning of the list. |
java.lang.Object |
getLast()
Returns the element at the end of the list. |
boolean |
isEmpty()
Returns true if there are no elements in the list
size == 0. |
ListIterator |
iterator()
Returns an ListIterator. |
void |
prepend(java.lang.Object elt)
Prepends given element to the beginning of the list. |
java.lang.Object |
removeFirst()
Removes and returns the first element in the list. |
java.lang.Object |
removeLast()
Removes last element in the list (optional operation). |
ReverseListIterator |
reverseIterator()
Creates a ReverseListIterator (optional operation).] |
int |
size()
Returns the size of the List. |
| Method Detail |
public void prepend(java.lang.Object elt)
elt - the element to be prepended.public void append(java.lang.Object o)
elt - the element to be appended.public java.lang.Object getFirst()
NoSuchElementException - if the list is empty.public java.lang.Object getLast()
NoSuchElementException - if the list is empty.public java.lang.Object removeFirst()
NoSuchElementException - if the list is empty.
public java.lang.Object removeLast()
throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException - public int size()
size in interface Collectionpublic boolean isEmpty()
true if there are no elements in the list
size == 0.isEmpty in interface Collectiontrue if there are no elements in the list
size == 0.public void clear()
clear in interface Collectionpublic ListIterator iterator()
ListIterator.
public ReverseListIterator reverseIterator()
throws java.lang.UnsupportedOperationException
UnsupportedMethodException -
|
BRUtil - Making Java a Kinder, Gentler, Place to be. |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||