|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.rdg.resc.jstyx.infernogrid.Sexpression
public class Sexpression
Simple representation of an S-expression. S-expressions contain atoms
and other S-expressions. So the S-expression (a (b c)) contains
the atom a and the S-expression (b c)
| Constructor Summary | |
|---|---|
Sexpression()
Creates a new instance of Sexpression |
|
| Method Summary | |
|---|---|
void |
add(java.lang.Object token)
Adds a token (an atom or another Sexpression) to this Sexpression |
int |
getSize()
|
java.lang.Object |
getToken(int i)
|
java.lang.String |
toString()
Recursive method to display the contents of this Sexpression |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Sexpression()
| Method Detail |
|---|
public void add(java.lang.Object token)
public int getSize()
public java.lang.Object getToken(int i)
java.lang.ArrayIndexOutOfBoundsException - if the given index is out of
rangepublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||