com.irs.jam
Class Predicate

java.lang.Object
  |
  +--com.irs.jam.Expression
        |
        +--com.irs.jam.Predicate
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PredicateAchieve, PredicateFact, PredicateRetrieve

public abstract class Predicate
extends Expression
implements java.io.Serializable

Predicates (expressions evaluable to true/false)

See Also:
Serialized Form

Field Summary
protected  Interpreter _interpreter
           
protected  java.lang.String _name
           
protected  Relation _relation
           
 
Fields inherited from class com.irs.jam.Expression
EXP_FUNCALL, EXP_PREDICATE, EXP_UNDEFINED, EXP_VALUE, EXP_VARIABLE
 
Constructor Summary
Predicate(java.lang.String name, Relation relation, Interpreter interpreter)
          Primary constructor
 
Method Summary
abstract  Value eval(Binding binding)
          Evaluates the expression to a single resultant
 void format(java.io.PrintStream s, Binding b)
          Output information considering that it may be inline with other information.
 Interpreter getInterpreter()
           
 java.lang.String getName()
           
 Relation getRelation()
           
 int getType()
           
 void print(java.io.PrintStream s, Binding b)
          Output information without consideration of being inline with other information.
 
Methods inherited from class com.irs.jam.Expression
equals, getVariable, isVariable, lessthan
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_name

protected java.lang.String _name

_relation

protected Relation _relation

_interpreter

protected Interpreter _interpreter
Constructor Detail

Predicate

public Predicate(java.lang.String name,
                 Relation relation,
                 Interpreter interpreter)
Primary constructor
Method Detail

getName

public java.lang.String getName()
Overrides:
getName in class Expression

getType

public int getType()
Overrides:
getType in class Expression

getRelation

public Relation getRelation()

getInterpreter

public Interpreter getInterpreter()

print

public void print(java.io.PrintStream s,
                  Binding b)
Output information without consideration of being inline with other information.
Overrides:
print in class Expression

format

public void format(java.io.PrintStream s,
                   Binding b)
Output information considering that it may be inline with other information.
Overrides:
format in class Expression

eval

public abstract Value eval(Binding binding)
Description copied from class: Expression
Evaluates the expression to a single resultant
Overrides:
eval in class Expression