|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.tfhberlin.panitz.eliza.Li | +--de.tfhberlin.panitz.eliza.MyList
A concrete implementation of abstract class Li.
Constructor Summary | |
MyList()
|
|
MyList(java.lang.Object x,
de.tfhberlin.panitz.eliza.Li xs)
|
Method Summary | |
de.tfhberlin.panitz.eliza.Li |
cons(java.lang.Object x,
de.tfhberlin.panitz.eliza.Li xs)
Constructs a new list by adding an element in front of an existing list. |
de.tfhberlin.panitz.eliza.Li |
empty()
Constructs a new empty list. |
java.lang.Object |
head()
Returns the first element of this list. |
boolean |
isEmpty()
Tests, if the list contains some element. |
void |
rotate()
Mutates this list, by appending first element as last. |
de.tfhberlin.panitz.eliza.Li |
tail()
Returns the list after the first element has been skipped. |
Methods inherited from class de.tfhberlin.panitz.eliza.Li |
drop, isPrefixIgnoreCaseOf, reverse, tails, toString, unwords, words |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MyList()
public MyList(java.lang.Object x, de.tfhberlin.panitz.eliza.Li xs)
Method Detail |
public de.tfhberlin.panitz.eliza.Li empty()
Li
empty
in class Li
public de.tfhberlin.panitz.eliza.Li cons(java.lang.Object x, de.tfhberlin.panitz.eliza.Li xs)
Li
cons
in class Li
x
- the first element for the new list.xs
- the tail for the new list.
public boolean isEmpty()
Li
isEmpty
in class Li
public java.lang.Object head()
Li
head
in class Li
public de.tfhberlin.panitz.eliza.Li tail()
Li
tail
in class Li
public void rotate()
Li
rotate
in class Li
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |