|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectname.panitz.eliza.LiImpl<a>
public class LiImpl<a>
A concrete implementation of abstract class Li.
Constructor Summary | |
---|---|
LiImpl()
|
|
LiImpl(a x,
Li<a> xs)
|
Method Summary | ||
---|---|---|
Li<a> |
append(Li<a> that)
Appends two list. |
|
Li<a> |
concat(Li<a> that)
Just another name for method append |
|
static
|
cons(b x,
Li<b> xs)
|
|
Li<a> |
drop(int i)
Removes the first i elements from a list. |
|
static
|
empty()
|
|
Li<a> |
filter(FilterCondition<a> cond)
Creates a list with all elements that fullfill the condition. |
|
a |
head()
Returns the first element of this list. |
|
boolean |
isEmpty()
Tests, if the list contains some element. |
|
int |
length()
|
|
Li<a> |
reverse()
Reverses the element order of the list. |
|
void |
rotate()
Mutates this list, by appending first element as last. |
|
Li<a> |
tail()
Returns the list after the first element has been skipped. |
|
Li<Li<a>> |
tails()
Makes a list of lists of all taillists. |
|
java.lang.String |
toString()
|
|
java.lang.String |
unwords()
Makes a list to a String adding whitespace between the list elements. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LiImpl()
public LiImpl(a x, Li<a> xs)
Method Detail |
---|
public static <b> Li<b> empty()
public static <b> Li<b> cons(b x, Li<b> xs)
public boolean isEmpty()
Li
isEmpty
in interface Li<a>
public a head()
Li
head
in interface Li<a>
public Li<a> tail()
Li
tail
in interface Li<a>
public void rotate()
Li
rotate
in interface Li<a>
public Li<a> filter(FilterCondition<a> cond)
Li
filter
in interface Li<a>
cond
- Condition to test if element is to be in result list.
public int length()
length
in interface Li<a>
public java.lang.String toString()
toString
in class java.lang.Object
public Li<a> append(Li<a> that)
Li
append
in interface Li<a>
that
- list which is appended to this for creating result
public Li<a> concat(Li<a> that)
Li
concat
in interface Li<a>
public Li<Li<a>> tails()
Li
tails
in interface Li<a>
public Li<a> drop(int i)
Li
drop
in interface Li<a>
i
- a positive number of elements to be skipped
from the beginning of the list.
public Li<a> reverse()
Li
reverse
in interface Li<a>
public java.lang.String unwords()
Li
unwords
in interface Li<a>
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |