|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuniverse.List<X>
universe.Cons<X>
public class Cons<X>
Represents a Lisp style cons list. You should not use the constructor, use List.push(...) to add an element to the front of the list. It is left public so that the parser generator can parse different lists if needed.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class universe.List |
|---|
List.Build<X>, List.Comp<X>, List.Fold<X,Y>, List.GComp<X,Y>, List.Map<X,Y>, List.Pred<X>, List.Stringer<X>, List.Zip<X,Y,Z> |
| Constructor Summary | |
|---|---|
Cons(X f,
List<X> r)
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Equals for Lists... |
X |
getFirst()
Getter for Entry.key |
List<X> |
getRest()
Getter for Entry.val |
int |
hashCode()
HashCode for Lists... |
boolean |
isEmpty()
Is this List Empty? |
List<X> |
pop()
Return this List without the first Element |
X |
top()
Return the first Element of this List |
| Methods inherited from class universe.List |
|---|
add, andmap, append, append, buildlist, contains, contains, containsAll, containsAll, containsAllG, containsAny, containsAny, containsAnyG, containsG, count, create, create, create, create, create, filter, filter, filterout, filterout, find, find, findG, fold, foldl, foldr, index, index, insert, insert, insertionSort, iterator, length, lookup, main, map, ormap, pop, push, push, remove, remove, remove, removeDuplicates, removeDuplicates, removeG, replace, replace, replace, replaceAll, replaceAll, reverse, reverse, same, same, sameG, shuffle, sort, sublist, toArray, toJavaList, toString, toString, toString, zip |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Cons(X f,
List<X> r)
| Method Detail |
|---|
public X top()
List
top in class List<X>public List<X> pop()
List
pop in class List<X>public boolean isEmpty()
List
isEmpty in class List<X>public boolean equals(java.lang.Object o)
List
equals in class List<X>public int hashCode()
List
hashCode in class List<X>public X getFirst()
public List<X> getRest()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||