|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--SchemeObject
This is the abstract base class for the SchemeObject hierarchy.
Constructor Summary | |
SchemeObject()
|
Method Summary | |
SchemeObject |
cadddr()
This calls getCar() and/or getCdr() |
SchemeObject |
caddr()
This calls getCar() and/or getCdr() |
SchemeObject |
cadr()
This calls getCar() and/or getCdr() |
SchemeObject |
car()
This calls getCar() and/or getCdr() |
SchemeObject |
cdar()
This calls getCar() and/or getCdr() |
SchemeObject |
cddr()
This calls getCar() and/or getCdr() |
SchemeObject |
cdr()
This calls getCar() and/or getCdr() |
SchemeObject |
getCar()
Dealing with the static type system of Java is not convenient when manipulating SchemeObjects because Scheme itself is denamically typed. |
SchemeObject |
getCdr()
Dealing with the static type system of Java is not convenient when manipulating SchemeObjects because Scheme itself is denamically typed. |
static SchemeObject |
read(java.io.InputStream inputStream)
This reads in a SchemeObject from the
InputStream that is passed in. |
static SchemeObject |
read(java.lang.String s)
This reads in a SchemeObject from the String . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SchemeObject()
Method Detail |
public SchemeObject getCar()
getCar()
and getCdr()
method. If the object is not a SchemePair
then
these methods should through a ClassCastException. As such,
the following are equivalent:
SchemeObject o = ...; System.out.println(o.getCar());and
SchemeObject o = ...; Scheme.out.println(((SchemePair)o).getCar());
car
of the SchemePair
.ClassCastException
- if this object does not override this method.SchemePair
public SchemeObject getCdr()
getCar()
and getCdr()
method. If the object is not a SchemePair
then
these methods should through a ClassCastException. As such,
the following are equivalent:
SchemeObject o = ...; System.out.println(o.getCdr());and
SchemeObject o = ...; Scheme.out.println(((SchemePair)o).getCdr());
cdr
of the SchemePair
.ClassCastException
- if this object does not override this method.SchemePair
public SchemeObject car()
getCar()
and/or getCdr()
car
of the SchemePair
.ClassCastException
- if this object does not override this method.SchemePair
,
getCar()
,
getCdr()
public SchemeObject cdr()
getCar()
and/or getCdr()
cdr
of the SchemePair
.ClassCastException
- if this object does not override this method.SchemePair
,
getCar()
,
getCdr()
public SchemeObject cadr()
getCar()
and/or getCdr()
cadr
of the SchemePair
.ClassCastException
- if this object does not override this method.SchemePair
,
getCar()
,
getCdr()
public SchemeObject caddr()
getCar()
and/or getCdr()
caddr
of the SchemePair
.ClassCastException
- if this object does not override this method.SchemePair
,
getCar()
,
getCdr()
public SchemeObject cddr()
getCar()
and/or getCdr()
cddr
of the SchemePair
.ClassCastException
- if this object does not override this method.SchemePair
,
getCar()
,
getCdr()
public SchemeObject cadddr()
getCar()
and/or getCdr()
cadddr
of the SchemePair
.ClassCastException
- if this object does not override this method.SchemePair
,
getCar()
,
getCdr()
public SchemeObject cdar()
getCar()
and/or getCdr()
cdar
of the SchemePair
.ClassCastException
- if this object does not override this method.SchemePair
,
getCar()
,
getCdr()
public static SchemeObject read(java.lang.String s) throws java.io.IOException, EndOfSchemeListException
SchemeObject
from the String
.s
- String
to read a SchemeObject
from.read(InputStream inputStream)
,
StringInputStream
public static SchemeObject read(java.io.InputStream inputStream) throws java.io.IOException, EndOfSchemeListException
SchemeObject
from the
InputStream
that is passed in. Subsequent calls
to read with this InputStream
are only guaranteed
to work correctly if this InputStream
is in fact
a PushbackInputStream
. To get a
PushbackInputStream
from an InputStream
(for example System.in
)
use new PushbackInputStream(System.in)
.inputStream
- The InputStream
to read the
SchemeObject
from.java.io.IOException
- if an there is an error reading from the
stream.EndOfSchemeListException
- if there is an unexpected end
of a list expression. For example: ")"
.InputStream
,
java.io.PushbackInputStream
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |