|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rubato.scheme.SExpr
org.rubato.scheme.SCons
public final class SCons
The class representing Scheme pairs.
Field Summary |
---|
Fields inherited from class org.rubato.scheme.SExpr |
---|
NULL, VOID |
Constructor Summary | |
---|---|
SCons()
Creates an complete pair where both car and cdr are (). |
|
SCons(SExpr car,
SExpr cdr)
Creates a pair with the given car and cdr . |
Method Summary | |
---|---|
java.lang.String |
display()
Returns a string representation of this SExpr. |
boolean |
eq_p(SExpr sexpr)
Returns true iff this is equal to sexpr in the eq? sense. |
boolean |
equal_p(SExpr sexpr)
Returns true iff this is equal to sexpr in the equal? sense. |
boolean |
equals(java.lang.Object obj)
Returns true iff this is equal to obj . |
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 |
isCons()
Returns true iff this is a cons. |
SExpr |
nth(int i)
Returns the i -th element if this is a regular
list, otherwise null. |
void |
setCar(SExpr car)
Sets the car of this SExpr. |
void |
setCdr(SExpr cdr)
Sets the cdr of this SExpr. |
java.lang.String |
toString()
Returns a string representation of this SExpr. |
Methods inherited from class org.rubato.scheme.SExpr |
---|
car, cdr, cons, isBoolean, isChar, isClosure, isComplex, isDenotator, isForm, isInteger, isList, isNull, isNumber, isPair, isPrimitive, isRational, isReal, isString, isSymbol, isVector, isVoid |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SCons()
public SCons(SExpr car, SExpr cdr)
car
and cdr
.
Method Detail |
---|
public SExpr getCar()
SExpr
getCar
in class SExpr
public SExpr getCdr()
SExpr
getCdr
in class SExpr
public void setCar(SExpr car)
SExpr
setCar
in class SExpr
public void setCdr(SExpr cdr)
SExpr
setCdr
in class SExpr
public int getLength()
SExpr
getLength
in class SExpr
public SExpr nth(int i)
SExpr
i
-th element if this is a regular
list, otherwise null.
nth
in class SExpr
public boolean eq_p(SExpr sexpr)
SExpr
sexpr
in the eq? sense.
eq_p
in class SExpr
public boolean eqv_p(SExpr sexpr)
SExpr
sexpr
in the eqv? sense.
eqv_p
in class SExpr
public boolean equal_p(SExpr sexpr)
SExpr
sexpr
in the equal? sense.
equal_p
in class SExpr
public boolean equals(java.lang.Object obj)
SExpr
obj
. Normally this
returns the same result as SExpr.equal_p(org.rubato.scheme.SExpr)
.
equals
in class SExpr
public boolean isCons()
SExpr
isCons
in class SExpr
public java.lang.String toString()
SExpr
toString
in class SExpr
public java.lang.String display()
SExpr
display
in class SExpr
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |