39 lines
589 B
Java
39 lines
589 B
Java
package sexpression;
|
|
|
|
@DisplayName("s-expression")
|
|
public abstract class SExpression {
|
|
|
|
public boolean isNull() {
|
|
return false;
|
|
}
|
|
|
|
public boolean isAtom() {
|
|
return false;
|
|
}
|
|
|
|
public boolean isCons() {
|
|
return false;
|
|
}
|
|
|
|
public boolean isList() {
|
|
return (isCons() || isNull());
|
|
}
|
|
|
|
public boolean isNumber() {
|
|
return false;
|
|
}
|
|
|
|
public boolean isSymbol() {
|
|
return false;
|
|
}
|
|
|
|
public boolean isFunction() {
|
|
return false;
|
|
}
|
|
|
|
public boolean isString() {
|
|
return false;
|
|
}
|
|
|
|
}
|