All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Jaja.Pair

java.lang.Object
   |
   +----Jaja.Jaja
           |
           +----Jaja.Value
                   |
                   +----Jaja.Pair

public class Pair
extends Value
This is the class of mutable pairs (dotted pairs in Lisp parlance). Fields are public for direct (and efficient) access.


Variable Index

 o car
 o cdr

Constructor Index

 o Pair(Value, Value)

Method Index

 o eprogn(Environment, WorldAble)
Evaluate a sequence of Values and return the value of the last one.
 o eprognInternal(Value, Environment, WorldAble)
 o equalp(Value)
Structural comparison: True if the two objects have the same class and content.
 o eval(Environment, WorldAble)
Evaluating a form or a sequence of forms.
 o list_length()
Computes the length of a Value.
 o toInnerReadableString()
Convert the content of a Value into a computer-readable Java String.
 o toInnerString()
Convert the content of a Value into a human-readable Java String.
 o toReadableString()
Convert a Value into a computer-readable Java String.
 o toString()
Convert a Value into a human-readable Java String.

Variables

 o car
 public Value car
 o cdr
 public Value cdr

Constructors

 o Pair
 public Pair(Value a,
             Value d)

Methods

 o equalp
 public boolean equalp(Value other)
Structural comparison: True if the two objects have the same class and content.

Overrides:
equalp in class Value
 o list_length
 public int list_length()
Computes the length of a Value.

Overrides:
list_length in class Value
 o toString
 public String toString()
Convert a Value into a human-readable Java String.

Overrides:
toString in class Value
 o toInnerString
 public String toInnerString()
Convert the content of a Value into a human-readable Java String.

Overrides:
toInnerString in class Value
 o toReadableString
 public String toReadableString()
Convert a Value into a computer-readable Java String.

Overrides:
toReadableString in class Value
 o toInnerReadableString
 public String toInnerReadableString()
Convert the content of a Value into a computer-readable Java String.

Overrides:
toInnerReadableString in class Value
 o eval
 public Value eval(Environment r,
                   WorldAble world)
Evaluating a form or a sequence of forms. Special operators are defined as a subclass of Symbols. Their behavior is specified as a method of their class. Therefore there as many classes as there are special operators (if, begin, set! ...). Surprisingly, there is no such thing as evlis. Evlis has to return an array of values so the length of the array has to be computed before it can be filled, then it is simple to fill this array.

Overrides:
eval in class Value
 o eprogn
 public Value eprogn(Environment r,
                     WorldAble world)
Evaluate a sequence of Values and return the value of the last one.

Overrides:
eprogn in class Value
 o eprognInternal
 public Value eprognInternal(Value previous,
                             Environment r,
                             WorldAble world)
Overrides:
eprognInternal in class Value

All Packages  Class Hierarchy  This Package  Previous  Next  Index