Jatha Software

org.jatha.dynatype
Class StandardLispFunction

java.lang.Object
  extended by org.jatha.dynatype.StandardLispValue
      extended by org.jatha.dynatype.StandardLispFunction
All Implemented Interfaces:
Comparable, LispFunction, LispValue
Direct Known Subclasses:
StandardLispMacro

public class StandardLispFunction
extends StandardLispValue
implements LispFunction

Implements a Common LISP 'function' type which represents built-in or user-defined functions.

See Also:
LispValue

Field Summary
private  LispValue f_code
           
private  boolean f_isBuiltin
           
private  LispValue f_symbol
           
 
Fields inherited from class org.jatha.dynatype.StandardLispValue
f_lisp
 
Constructor Summary
StandardLispFunction()
           
StandardLispFunction(Jatha lisp)
          Creates a function with no content - not recommended.
StandardLispFunction(Jatha lisp, LispValue symbol, LispValue code)
          Send in the instance of Jatha and the code for this function.
 
Method Summary
 boolean basic_functionp()
          Returns Java true if the object is a function.
 LispValue getCode()
          Gets the code of the function.
 LispValue getSymbol()
          Returns the symbol that owns this function.
 void internal_prin1(PrintStream os)
           
 void internal_princ(PrintStream os)
           
 void internal_print(PrintStream os)
           
 boolean isBuiltin()
          Returns true if this is a builtin function.
 Object toJava()
          Returns a Java HashMap containing the contents of this HashTable.
 String toString()
          toString() returns a printed representation of the form (as printed by (prin1)) in a Java string.
 
Methods inherited from class org.jatha.dynatype.StandardLispValue
abs, acos, add, adjustSpecialCount, append, apply, apropos_print, asin, assoc, atan, atan2, atom, basic_atom, basic_bignump, basic_consp, basic_constantp, basic_floatp, basic_foreignp, basic_integerp, basic_keywordp, basic_length, basic_listp, basic_macrop, basic_null, basic_numberp, basic_stringp, basic_symbolp, bignump, boundp, butlast, car, cdr, ceiling, characterp, clrhash, compareTo, concatenate, consp, constantp, contains, copy_list, copy, cos, cot, csc, degreesToRadians, divide, documentation, eighth, elt, elt, eq, eql, equal, equalNumeric, factorial, fboundp, fifth, first, floatp, floor, fourth, funcall, functionp, get_specialCount, gethash, gethash, getLisp, greaterThan, greaterThanOrEqual, hash_table_count, hash_table_rehash_size, hash_table_rehash_threshold, hash_table_size, hash_table_test, hashtablep, integerp, internal_getName, internal_prin1_as_cdr, internal_princ_as_cdr, internal_print_as_cdr, iterator, keywordp, last, length, lessThan, lessThanOrEqual, lisp_null, list, listp, max, member, min, multiply, nconc, negate, neql, ninth, nreverse, nstringCapitalize, nstringDowncase, nstringUpcase, numberp, pop, position, prin1, princ, print, push, radiansToDegrees, rassoc, readFromString, reciprocal, remhash, remove, rest, reverse, rplaca, rplacd, sec, second, set_special, setf_documentation, setf_gethash, setf_symbol_function, setf_symbol_plist, setf_symbol_value, setLisp, setPackage, setq, seventh, showStackTrace, sin, sixth, specialP, sqrt, string, stringCapitalize, stringDowncase, stringEndsWith, stringEq, stringEqual, stringGreaterP, stringGreaterThan, stringGreaterThanOrEqual, stringLeftTrim, stringLeftTrim, stringLessP, stringLessThan, stringLessThanOrEqual, stringNeq, stringNotGreaterP, stringNotLessP, stringp, stringRightTrim, stringRightTrim, stringStartsWith, stringTrim, stringTrim, stringUpcase, subst, substring, substring, subtract, symbol_function, symbol_name, symbol_package, symbol_plist, symbol_value, symbolp, tan, tenth, third, toCollection, toJava, toString, toStringAsCdr_internal, toStringAsCdr, toStringShort, toStringShort, toStringSimple, type_of, typep, uses, zerop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jatha.dynatype.LispValue
abs, acos, add, adjustSpecialCount, append, apply, apropos_print, asin, assoc, atan, atan2, atom, basic_atom, basic_bignump, basic_consp, basic_constantp, basic_floatp, basic_foreignp, basic_integerp, basic_keywordp, basic_length, basic_listp, basic_macrop, basic_null, basic_numberp, basic_stringp, basic_symbolp, bignump, boundp, butlast, car, cdr, ceiling, characterp, clrhash, compareTo, concatenate, consp, constantp, contains, copy_list, copy, cos, cot, csc, degreesToRadians, divide, documentation, eighth, elt, elt, eq, eql, equal, equalNumeric, factorial, fboundp, fifth, first, floatp, floor, fourth, funcall, functionp, get_specialCount, gethash, gethash, getLisp, greaterThan, greaterThanOrEqual, hash_table_count, hash_table_rehash_size, hash_table_rehash_threshold, hash_table_size, hash_table_test, hashtablep, integerp, internal_getName, internal_prin1_as_cdr, internal_princ_as_cdr, internal_print_as_cdr, iterator, keywordp, last, length, lessThan, lessThanOrEqual, lisp_null, list, listp, max, member, min, multiply, nconc, negate, neql, ninth, nreverse, nstringCapitalize, nstringDowncase, nstringUpcase, numberp, pop, position, prin1, princ, print, push, radiansToDegrees, rassoc, readFromString, reciprocal, remhash, remove, rest, reverse, rplaca, rplacd, sec, second, set_special, setf_documentation, setf_gethash, setf_symbol_function, setf_symbol_plist, setf_symbol_value, setLisp, setPackage, setq, seventh, sin, sixth, specialP, sqrt, string, stringCapitalize, stringDowncase, stringEndsWith, stringEq, stringEqual, stringGreaterP, stringGreaterThan, stringGreaterThanOrEqual, stringLeftTrim, stringLeftTrim, stringLessP, stringLessThan, stringLessThanOrEqual, stringNeq, stringNotGreaterP, stringNotLessP, stringp, stringRightTrim, stringRightTrim, stringStartsWith, stringTrim, stringTrim, stringUpcase, subst, substring, substring, subtract, symbol_function, symbol_name, symbol_package, symbol_plist, symbol_value, symbolp, tan, tenth, third, toCollection, toJava, toString, toStringAsCdr_internal, toStringAsCdr, toStringShort, toStringShort, toStringSimple, type_of, typep, uses, zerop
 

Field Detail

f_isBuiltin

private boolean f_isBuiltin

f_symbol

private LispValue f_symbol

f_code

private LispValue f_code
Constructor Detail

StandardLispFunction

public StandardLispFunction()

StandardLispFunction

public StandardLispFunction(Jatha lisp)
Creates a function with no content - not recommended.


StandardLispFunction

public StandardLispFunction(Jatha lisp,
                            LispValue symbol,
                            LispValue code)
Send in the instance of Jatha and the code for this function.

Method Detail

toString

public String toString()
Description copied from class: StandardLispValue
toString() returns a printed representation of the form (as printed by (prin1)) in a Java string.

Specified by:
toString in interface LispValue
Overrides:
toString in class StandardLispValue
Returns:
String The value in a string.

internal_princ

public void internal_princ(PrintStream os)
Specified by:
internal_princ in interface LispValue
Overrides:
internal_princ in class StandardLispValue

internal_prin1

public void internal_prin1(PrintStream os)
Specified by:
internal_prin1 in interface LispValue
Overrides:
internal_prin1 in class StandardLispValue

internal_print

public void internal_print(PrintStream os)
Specified by:
internal_print in interface LispValue
Overrides:
internal_print in class StandardLispValue

toJava

public Object toJava()
Returns a Java HashMap containing the contents of this HashTable.

Specified by:
toJava in interface LispValue
Overrides:
toJava in class StandardLispValue

basic_functionp

public boolean basic_functionp()
Description copied from interface: LispValue
Returns Java true if the object is a function.

Specified by:
basic_functionp in interface LispValue
Overrides:
basic_functionp in class StandardLispValue

getCode

public LispValue getCode()
Gets the code of the function.

Specified by:
getCode in interface LispFunction

getSymbol

public LispValue getSymbol()
Returns the symbol that owns this function.

Specified by:
getSymbol in interface LispFunction

isBuiltin

public boolean isBuiltin()
Returns true if this is a builtin function.

Specified by:
isBuiltin in interface LispFunction

Jatha Software