|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.tools.sexpr.Cons
public class Cons
Basic class for implementing linked lists a la Lisp.
Constructor Summary | |
---|---|
Cons(java.lang.Object left)
Initializes a Cons cell with a left subtree only. |
|
Cons(java.lang.Object left,
java.lang.Object right)
Initializes a Cons cell with the left and right "subtrees". |
Method Summary | |
---|---|
java.util.Enumeration |
elements()
|
java.lang.Object |
left()
Returns the left subtree (i.e. |
void |
printExpr(java.io.PrintStream stream)
Print a representation of the s-expression into the output stream. |
Cons |
rest()
Returns the tail of a cons cell if it is a list. |
java.lang.Object |
right()
Returns the right subtree (i.e. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Cons(java.lang.Object left, java.lang.Object right)
public Cons(java.lang.Object left)
Method Detail |
---|
public java.lang.Object left()
public java.lang.Object right()
public Cons rest() throws SExprParserException
SExprParserException
- if the tail is not a Cons or nullpublic java.util.Enumeration elements()
public void printExpr(java.io.PrintStream stream)
SExpr
printExpr
in interface SExpr
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |