Class Seq0<T>

java.lang.Object
  extended by Seq<T>
      extended by Seq0<T>

public final class Seq0<T>
extends Seq<T>

A empty sequence subclass of Seq. See the documentation of Seq.


Nested Class Summary
 
Nested classes/interfaces inherited from class Seq
Seq.SeqIterator
 
Constructor Summary
Seq0()
           
 
Method Summary
 Seq<T> copy()
          Accessor that copies the sequence.
 boolean equals(java.lang.Object obj)
           
 T getFirst()
          Accessor returning the first element in sequence.
protected  Seq<T> getSubseq()
           
 boolean isEmpty()
          Accessor testing emptyness.
 int length()
          Accessor determining length.
protected  Seq<T> reverseRecurs(Seq<T> buildMe)
           
 void setFirst(T t)
          Mutator that resets the first value of the sequence.
protected  void setSubseq(Seq<T> t)
           
protected  char[] toStringRecurs(int where)
           
 
Methods inherited from class Seq
iterator, reverse, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Seq0

public Seq0()
Method Detail

isEmpty

public boolean isEmpty()
Description copied from class: Seq
Accessor testing emptyness.

Specified by:
isEmpty in class Seq<T>
Returns:
true iff the sequence is empty

length

public int length()
Description copied from class: Seq
Accessor determining length.

Specified by:
length in class Seq<T>
Returns:
an int giving the length of the sequence

setFirst

public void setFirst(T t)
Description copied from class: Seq
Mutator that resets the first value of the sequence.

Specified by:
setFirst in class Seq<T>
Parameters:
t - a generic value to replace the first in the sequence

getFirst

public T getFirst()
Description copied from class: Seq
Accessor returning the first element in sequence.

Specified by:
getFirst in class Seq<T>
Returns:
the first element of the seqeunce.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

copy

public Seq<T> copy()
Description copied from class: Seq
Accessor that copies the sequence.

Specified by:
copy in class Seq<T>
Returns:
a clone

getSubseq

protected Seq<T> getSubseq()
Specified by:
getSubseq in class Seq<T>

setSubseq

protected void setSubseq(Seq<T> t)
Specified by:
setSubseq in class Seq<T>

toStringRecurs

protected char[] toStringRecurs(int where)
Specified by:
toStringRecurs in class Seq<T>

reverseRecurs

protected Seq<T> reverseRecurs(Seq<T> buildMe)
Specified by:
reverseRecurs in class Seq<T>