|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rubato.scheme.SExpr
public abstract class SExpr
This is the abstract base class for all types of Scheme values, e.g., numbers, symbols, conses, closures, etc.
Field Summary | |
---|---|
static SExpr |
NULL
The unique instance of the Scheme () value. |
static SExpr |
VOID
The unique instance representating a non-value result. |
Method Summary | |
---|---|
static SExpr |
car(SExpr sexpr)
Returns the car of sexpr , which must be an SCons. |
static SExpr |
cdr(SExpr sexpr)
Returns the car of sexpr , which must be an SCons. |
static SCons |
cons(SExpr car,
SExpr cdr)
Returns the cons of car and cdr . |
abstract java.lang.String |
display()
Returns a string representation of this SExpr. |
abstract boolean |
eq_p(SExpr sexpr)
Returns true iff this is equal to sexpr in the eq? sense. |
abstract boolean |
equal_p(SExpr sexpr)
Returns true iff this is equal to sexpr in the equal? sense. |
abstract boolean |
equals(java.lang.Object obj)
Returns true iff this is equal to obj . |
abstract boolean |
eqv_p(SExpr sexpr)
Returns true iff this is equal to sexpr in the eqv? sense. |
SExpr |
getCar()
Returns the car of this SExpr. |
SExpr |
getCdr()
Returns the cdr of this SExpr. |
int |
getLength()
Returns the length if this is a regular list, otherwise -1. |
boolean |
isBoolean()
Returns true iff this is a boolean. |
boolean |
isChar()
Returns true iff this is a character. |
boolean |
isClosure()
Returns true iff this is a closure. |
boolean |
isComplex()
Returns true iff this is a complex number. |
boolean |
isCons()
Returns true iff this is a cons. |
boolean |
isDenotator()
Returns true iff this is a Scheme denotator object. |
boolean |
isForm()
Returns true iff this is a Scheme form object. |
boolean |
isInteger()
Returns true iff this is an integer. |
boolean |
isList()
Returns true iff this is a list. |
boolean |
isNull()
Returns true iff this is the Scheme () value. |
boolean |
isNumber()
Returns true iff this is a number. |
boolean |
isPair()
Returns true iff this is a cons. |
boolean |
isPrimitive()
Returns true iff this is a primitive function. |
boolean |
isRational()
Returns true iff this is a rational. |
boolean |
isReal()
Returns true iff this is a real number. |
boolean |
isString()
Returns true iff this is a Scheme string. |
boolean |
isSymbol()
Returns true iff this is a Scheme symbol. |
boolean |
isVector()
Returns true iff this is a Scheme vector. |
boolean |
isVoid()
Returns true iff this is the Scheme no-value. |
SExpr |
nth(int i)
Returns the i -th element if this is a regular
list, otherwise null. |
void |
setCar(SExpr sexpr)
Sets the car of this SExpr. |
void |
setCdr(SExpr sexpr)
Sets the cdr of this SExpr. |
abstract java.lang.String |
toString()
Returns a string representation of this SExpr. |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final SExpr NULL
public static final SExpr VOID
Method Detail |
---|
public static final SCons cons(SExpr car, SExpr cdr)
car
and cdr
.
public static final SExpr car(SExpr sexpr)
sexpr
, which must be an SCons.
public static final SExpr cdr(SExpr sexpr)
sexpr
, which must be an SCons.
public abstract boolean eq_p(SExpr sexpr)
sexpr
in the eq? sense.
public abstract boolean eqv_p(SExpr sexpr)
sexpr
in the eqv? sense.
public abstract boolean equal_p(SExpr sexpr)
sexpr
in the equal? sense.
public abstract boolean equals(java.lang.Object obj)
obj
. Normally this
returns the same result as equal_p(org.rubato.scheme.SExpr)
.
equals
in class java.lang.Object
public abstract java.lang.String toString()
toString
in class java.lang.Object
public abstract java.lang.String display()
public boolean isNull()
public boolean isVoid()
public boolean isCons()
public boolean isNumber()
public boolean isInteger()
public boolean isRational()
public boolean isReal()
public boolean isComplex()
public boolean isString()
public boolean isChar()
public boolean isBoolean()
public boolean isVector()
public boolean isSymbol()
public boolean isClosure()
public boolean isPrimitive()
public boolean isDenotator()
public boolean isForm()
public boolean isList()
public SExpr getCar()
public SExpr getCdr()
public void setCar(SExpr sexpr)
public void setCdr(SExpr sexpr)
public boolean isPair()
public int getLength()
public SExpr nth(int i)
i
-th element if this is a regular
list, otherwise null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |