|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Li<a>
An abstract description of a simple linked list.
Method Summary | |
---|---|
Li<a> |
append(Li<a> that)
Appends two list. |
Li<a> |
concat(Li<a> that)
Just another name for method append |
Li<a> |
drop(int i)
Removes the first i elements from a list. |
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 |
unwords()
Makes a list to a String adding whitespace between the list elements. |
Method Detail |
---|
boolean isEmpty()
a head()
Li<a> tail()
int length()
Li<a> append(Li<a> that)
that
- list which is appended to this for creating result
Li<a> concat(Li<a> that)
Li<a> filter(FilterCondition<a> cond)
cond
- Condition to test if element is to be in result list.
Li<Li<a>> tails()
Li<a> drop(int i)
i
- a positive number of elements to be skipped
from the beginning of the list.
Li<a> reverse()
void rotate()
java.lang.String unwords()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |