|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectopenlist.OpenList<Type>
openlist.incremental.IncrementalList<Type>
public class IncrementalList<Type>
An IncrementalList is a special case of OpenList that can be expanded incrementally from the tail forward. For example, it can be used to represent infinite lists.
| Field Summary | |
|---|---|
(package private) Growable<Type> |
growable
IncrementalLists are non-empty, by definition. |
| Fields inherited from class openlist.OpenList |
|---|
head, NIL, tail |
| Constructor Summary | |
|---|---|
IncrementalList(Type head,
Growable<Type> growable)
The constructor for IncrementalList |
|
| Method Summary | |
|---|---|
IncrementalList<Type> |
cons(Type head)
A version of cons that produces an IncrementalList from this IncrementalList and a new first element |
void |
ensureGrown()
Make sure that the Growable part has grown at least one level so that, e.g. |
boolean |
grown()
Indicate whether or not the Growable part has grown |
OpenList<java.lang.Object> |
map(Function1arg<Type> f)
Map a 1-ary function over this list of elements. |
OpenList<Type> |
rest()
Get the elements following the head this, an OpenList. |
java.lang.String |
toString(java.lang.String start,
java.lang.String separator,
java.lang.String end)
Return a String representation of this OpenList. |
| Methods inherited from class openlist.OpenList |
|---|
append, append, assoc, assoc, categorize, categorize, categorize, cons, elements, equals, first, first, foldl, foldr, fourth, fromCollection, isEmpty, isEmpty, last, length, list, member, neutralize, nonEmpty, nonEmpty, nth, OpenListFromArray, range, rest, reverse, reverse, second, third, toArray, toCollection, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
Growable<Type> growable
| Constructor Detail |
|---|
public IncrementalList(Type head,
Growable<Type> growable)
head - the first element of the listgrowable - produces the rest of the elements of the list| Method Detail |
|---|
public IncrementalList<Type> cons(Type head)
cons in class OpenList<Type>head -
public OpenList<Type> rest()
OpenList
rest in class OpenList<Type>public void ensureGrown()
public boolean grown()
public OpenList<java.lang.Object> map(Function1arg<Type> f)
map in class OpenList<Type>f - the function to be mapped
public java.lang.String toString(java.lang.String start,
java.lang.String separator,
java.lang.String end)
toString in class OpenList<Type>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||