|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.comp211.laundry.list.BiList<T>
public class BiList<T>
A circularly linked class implementing the BiListI interface.
Constructor Summary | |
---|---|
BiList()
|
Method Summary | ||
---|---|---|
|
accept(BiListIVisitor<T,R> visitor)
|
|
boolean |
equals(Object other)
Returns true if all elements in this list and the given list are equal. |
|
BiList<T> |
insertFront(T o)
Inserts the given value at the front of the list |
|
BiList<T> |
insertRear(T o)
Insert the given value at the end of the list |
|
boolean |
isEmpty()
Test if this enumeration is empty |
|
int |
length()
Returns the number of elements in the list |
|
BiIteratorI<T> |
newIterator()
Factory method that creates an iterator initialized to point at the start of the list. |
|
BiListI<T> |
newList()
Factory method for a new, empty list that holds the same type of elements as this list. |
|
T |
remFront()
Removes the first element of the list |
|
T |
remRear()
Remove the last element in the list |
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BiList()
Method Detail |
---|
public String toString()
toString
in class Object
public boolean isEmpty()
EnumI
isEmpty
in interface EnumI<T>
public <R> R accept(BiListIVisitor<T,R> visitor)
accept
in interface BiListI<T>
public BiListI<T> newList()
newList
in interface BiListI<T>
newList
in interface ListI<T>
public int length()
length
in interface ListI<T>
public BiList<T> insertFront(T o)
insertFront
in interface ListI<T>
o
- the new element to insert
public BiList<T> insertRear(T o)
insertRear
in interface ListI<T>
o
- the new element to insert
public T remFront()
remFront
in interface ListI<T>
IllegalState
- exception if list is emptypublic BiIteratorI<T> newIterator()
newIterator
in interface BiListI<T>
newIterator
in interface EnumI<T>
newIterator
in interface ListI<T>
public T remRear()
remRear
in interface BiListI<T>
IllegalStateException
- if the list is empty.public boolean equals(Object other)
equals
in class Object
o
- the other list
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |