GNU Prolog for Java

gnu.prolog.vm.buildins.termcomparsion
Class Predicate_compare

java.lang.Object
  extended by gnu.prolog.vm.ExecuteOnlyCode
      extended by gnu.prolog.vm.buildins.termcomparsion.Predicate_compare
All Implemented Interfaces:
Installable, PrologCode

public class Predicate_compare
extends ExecuteOnlyCode

Author:
Michiel Hendriks

Field Summary
protected  TermComparator comp
           
static AtomTerm EQ_ATOM
           
static AtomTerm GT_ATOM
           
static AtomTerm LT_ATOM
           
 
Fields inherited from interface gnu.prolog.vm.PrologCode
FAIL, HALT, SUCCESS, SUCCESS_LAST
 
Constructor Summary
Predicate_compare()
           
 
Method Summary
 int execute(Interpreter interpreter, boolean backtrackMode, Term[] args)
          this method is used for execution of code
 
Methods inherited from class gnu.prolog.vm.ExecuteOnlyCode
install, uninstall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EQ_ATOM

public static final AtomTerm EQ_ATOM

LT_ATOM

public static final AtomTerm LT_ATOM

GT_ATOM

public static final AtomTerm GT_ATOM

comp

protected TermComparator comp
Constructor Detail

Predicate_compare

public Predicate_compare()
Method Detail

execute

public int execute(Interpreter interpreter,
                   boolean backtrackMode,
                   Term[] args)
            throws PrologException
Description copied from interface: PrologCode
this method is used for execution of code

Specified by:
execute in interface PrologCode
Specified by:
execute in class ExecuteOnlyCode
Parameters:
interpreter - interpreter in which context code is executed
backtrackMode - true if predicate is called on backtracking and false otherwise
args - arguments of code
Returns:
either SUCCESS, SUCCESS_LAST, or FAIL.
Throws:
PrologException

GNU Prolog for Java