Algernon Software

org.algernon.datatype
Class Closure

java.lang.Object
  extended byorg.jatha.dynatype.StandardLispValue
      extended byorg.algernon.datatype.Closure
All Implemented Interfaces:
Comparable, LispValue

public class Closure
extends StandardLispValue

A closure encapsulates a rule that is ready to execute.


Field Summary
private static long COUNTER
           
private  Algernon f_algy
           
protected  AlgernonFrame f_associatedFrame
           
protected  BindingList f_bindings
           
protected  String f_id
           
protected  LispValue f_key
           
protected  LispValue f_lookupVars
           
protected  Rule f_rule
           
private static DecimalFormat ID_FORMAT
           
private static String ID_NAME
           
 
Fields inherited from class org.jatha.dynatype.StandardLispValue
f_lisp
 
Constructor Summary
Closure(Algernon algy, Rule rule, BindingList bindings, AlgernonFrame associatedFrame, LispValue key, LispValue lookupVars)
           
 
Method Summary
private static String generateID()
           
 AlgernonFrame getAssociatedFrame()
          Returns the frame the rule in this closure is associated with.
 BindingList getBindings()
           
 String getId()
           
 LispValue getKey()
           
 LispValue getLookupVars()
           
 Rule getRule()
          Returns the rule this Closure encloses.
 void setAssociatedFrame(AlgernonFrame associatedFrame)
           
 void setBindings(BindingList bindings)
           
 void setId(String id)
           
 void setKey(LispValue key)
           
 void setLookupVars(LispValue lookupVars)
           
 String toString()
           
 
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_functionp, 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, 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_prin1, internal_princ_as_cdr, internal_princ, internal_print_as_cdr, internal_print, 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, reciprocal, remhash, remove, rest, reverse, rplaca, rplacd, sec, second, set_special, 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, toJava, toString, toStringAsCdr_internal, toStringAsCdr, toStringShort, toStringShort, toStringSimple, type_of, typep, zerop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COUNTER

private static long COUNTER

ID_NAME

private static String ID_NAME

ID_FORMAT

private static DecimalFormat ID_FORMAT

f_rule

protected Rule f_rule

f_associatedFrame

protected AlgernonFrame f_associatedFrame

f_bindings

protected BindingList f_bindings

f_key

protected LispValue f_key

f_lookupVars

protected LispValue f_lookupVars

f_id

protected String f_id

f_algy

private Algernon f_algy
Constructor Detail

Closure

public Closure(Algernon algy,
               Rule rule,
               BindingList bindings,
               AlgernonFrame associatedFrame,
               LispValue key,
               LispValue lookupVars)
Method Detail

toString

public String toString()

generateID

private static String generateID()

getRule

public Rule getRule()
Returns the rule this Closure encloses.


getAssociatedFrame

public AlgernonFrame getAssociatedFrame()
Returns the frame the rule in this closure is associated with.


setAssociatedFrame

public void setAssociatedFrame(AlgernonFrame associatedFrame)

getBindings

public BindingList getBindings()

setBindings

public void setBindings(BindingList bindings)

getKey

public LispValue getKey()

setKey

public void setKey(LispValue key)

getLookupVars

public LispValue getLookupVars()

setLookupVars

public void setLookupVars(LispValue lookupVars)

getId

public String getId()

setId

public void setId(String id)

Algernon Software