Class Seq2<T>
java.lang.Object
Seq<T>
Seq2<T>
public final class Seq2<T>
- extends Seq<T>
A nonempty sequence subclass of Seq.
See the documentation of Seq.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
car
protected T car
cdr
protected Seq<T> cdr
Seq2
public Seq2(T f,
Seq<T> r)
Seq2
public Seq2(T f)
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
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
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
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.
setSubseq
protected void setSubseq(Seq<T> t)
- Specified by:
setSubseq
in class Seq<T>
getSubseq
protected Seq<T> getSubseq()
- Specified by:
getSubseq
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>