|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ksu.cis.viewer.ConsList
An immutable linear recursive structure with a head, which is an Object, and a tail, which is a ConsList.
Constructor Summary | |
ConsList()
Constructs an empty ConsList. |
|
ConsList(Object h,
ConsList lst)
Constructs a ConsList with the given head and tail. |
Method Summary | |
Object |
getHead()
Returns the head of this list. |
ConsList |
getTail()
Returns the tail of the list. |
boolean |
isEmpty()
Returns true if this list is empty. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConsList()
public ConsList(Object h, ConsList lst)
h
- the head of the listlst
- the tail of the listMethod Detail |
public boolean isEmpty()
public Object getHead() throws EmptyListException
EmptyListException
- If this list is empty.public ConsList getTail() throws EmptyListException
EmptyListException
- If this list is empty.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |