edu.rice.comp211.laundry.sync
Class SyncBiList<T>

java.lang.Object
  extended by edu.rice.comp211.laundry.list.BiList<T>
      extended by edu.rice.comp211.laundry.sync.SyncBiList<T>
All Implemented Interfaces:
BiListI<T>, EnumI<T>, ListI<T>

public class SyncBiList<T>
extends BiList<T>

Specialty BiList that is used by the GUI to create animations by slowing the speed of the list operations down. Students should not need to use this class at all.


Constructor Summary
SyncBiList()
           
 
Method Summary
 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
 
Methods inherited from class edu.rice.comp211.laundry.list.BiList
accept, equals, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SyncBiList

public SyncBiList()
Method Detail

isEmpty

public boolean isEmpty()
Description copied from interface: EnumI
Test if this enumeration is empty

Specified by:
isEmpty in interface EnumI<T>
Overrides:
isEmpty in class BiList<T>
Returns:
true if this enumeration is empty.

newList

public BiListI<T> newList()
Description copied from class: BiList
Factory method for a new, empty list that holds the same type of elements as this list.

Specified by:
newList in interface BiListI<T>
Specified by:
newList in interface ListI<T>
Overrides:
newList in class BiList<T>
Returns:
a new BiList<T>

length

public int length()
Description copied from class: BiList
Returns the number of elements in the list

Specified by:
length in interface ListI<T>
Overrides:
length in class BiList<T>
Returns:
the number of elements in the list

insertFront

public BiList<T> insertFront(T o)
Description copied from class: BiList
Inserts the given value at the front of the list

Specified by:
insertFront in interface ListI<T>
Overrides:
insertFront in class BiList<T>
Parameters:
o - the new element to insert
Returns:
a reference to this list.

insertRear

public BiList<T> insertRear(T o)
Description copied from class: BiList
Insert the given value at the end of the list

Specified by:
insertRear in interface ListI<T>
Overrides:
insertRear in class BiList<T>
Parameters:
o - the new element to insert
Returns:
a reference to this list

remFront

public T remFront()
Description copied from class: BiList
Removes the first element of the list

Specified by:
remFront in interface ListI<T>
Overrides:
remFront in class BiList<T>
Returns:
the element that was removed.

newIterator

public BiIteratorI<T> newIterator()
Description copied from class: BiList
Factory method that creates an iterator initialized to point at the start of the list. Virtual constructors for iterators; identical except for return type

Specified by:
newIterator in interface BiListI<T>
Specified by:
newIterator in interface EnumI<T>
Specified by:
newIterator in interface ListI<T>
Overrides:
newIterator in class BiList<T>
Returns:
a BiIteratorI<T> interator

remRear

public T remRear()
Description copied from class: BiList
Remove the last element in the list

Specified by:
remRear in interface BiListI<T>
Overrides:
remRear in class BiList<T>
Returns:
the element that was removed