Class SchemePair

java.lang.Object
  |
  +--SchemeObject
        |
        +--SchemeList
              |
              +--SchemePair

public class SchemePair
extends SchemeList


Constructor Summary
SchemePair()
           
SchemePair(SchemeObject theCar, SchemeObject theCdr)
           
 
Method Summary
 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.
 SchemePair getNext()
           
 java.lang.String inListToString()
           
 void setCar(SchemeObject newCar)
           
 void setCdr(SchemeObject newCdr)
           
 java.lang.String toString()
           
 
Methods inherited from class SchemeObject
cadddr, caddr, cadr, car, cdar, cddr, cdr, read, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SchemePair

public SchemePair(SchemeObject theCar,
                  SchemeObject theCdr)

SchemePair

public SchemePair()
Method Detail

getCar

public SchemeObject getCar()
Description copied from class: SchemeObject
Dealing with the static type system of Java is not convenient when manipulating SchemeObjects because Scheme itself is denamically typed. To make manipulating Scheme objects and lists in particular more convenient we make all SchemeObjects provide a 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());
 
Overrides:
getCar in class SchemeObject
Following copied from class: SchemeObject
Returns:
The car of the SchemePair.
Throws:
ClassCastException - if this object does not override this method.
See Also:
SchemePair

getCdr

public SchemeObject getCdr()
Description copied from class: SchemeObject
Dealing with the static type system of Java is not convenient when manipulating SchemeObjects because Scheme itself is denamically typed. To make manipulating Scheme objects and lists in particular more convenient we make all SchemeObjects provide a 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());
 
Overrides:
getCdr in class SchemeObject
Following copied from class: SchemeObject
Returns:
The cdr of the SchemePair.
Throws:
ClassCastException - if this object does not override this method.
See Also:
SchemePair

getNext

public SchemePair getNext()

setCar

public void setCar(SchemeObject newCar)

setCdr

public void setCdr(SchemeObject newCdr)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

inListToString

public java.lang.String inListToString()