|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- the type of elements held by this listpublic interface ListI<T>
A mutable linear list of elements of type T that can be scanned from first (front) to last (rear). This interface is easily implemented as a singly linked list. This list always includes a dummy node preceding the first element (following the last element) and behaves as if it is circular when scanned by an iterator.
Method Summary | |
---|---|
ListI<T> |
insertFront(T o)
Inserts the object o at the front of this list |
ListI<T> |
insertRear(T o)
Inserts the object o at the rear of this list. |
int |
length()
The number of elements in the list |
IteratorI<T> |
newIterator()
Factory method that instantiates a new iterator over this list. |
ListI<T> |
newList()
Factory method to instantiate a new empty list that can hold the same type of element. |
T |
remFront()
Removes the element at the front of the list. |
Methods inherited from interface edu.rice.comp211.laundry.list.EnumI |
---|
isEmpty |
Method Detail |
---|
ListI<T> newList()
int length()
ListI<T> insertFront(T o)
o
- the object to insert
ListI<T> insertRear(T o)
o
- the object to insert
T remFront()
IteratorI<T> newIterator()
newIterator
in interface EnumI<T>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |