JSHOP2
Class InternalAxiom

java.lang.Object
  extended by JSHOP2.CompileTimeObject
      extended by JSHOP2.InternalElement
          extended by JSHOP2.InternalAxiom

public class InternalAxiom
extends InternalElement

Each axiom at compile time is represented as an instance of this class.

Version:
1.0.3
Author:
Okhtay Ilghami, http://www.cs.umd.edu/~okhtay

Field Summary
private  java.util.Vector<LogicalPrecondition> branches
          A Vector of logical expressions each of which represents a branch of the axiom.
private static int classCnt
          The number of objects already instantiated from this class.
private  java.util.Vector<java.lang.String> labels
          A Vector of Strings each of which represents the label of a branch of this axiom.
 
Fields inherited from class JSHOP2.CompileTimeObject
endl
 
Constructor Summary
InternalAxiom(Predicate head, java.util.Vector<LogicalPrecondition> branchesIn, java.util.Vector<java.lang.String> labelsIn)
          To initialize an InternalAxiom object.
 
Method Summary
 java.lang.String toCode()
          This function produces the Java code needed to implement this axiom.
 
Methods inherited from class JSHOP2.InternalElement
getCnt, getHead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

branches

private java.util.Vector<LogicalPrecondition> branches
A Vector of logical expressions each of which represents a branch of the axiom. Note that we use a Vector rather than an array because at compile time we do not know how many branches a particular axiom will have.


classCnt

private static int classCnt
The number of objects already instantiated from this class.


labels

private java.util.Vector<java.lang.String> labels
A Vector of Strings each of which represents the label of a branch of this axiom.

Constructor Detail

InternalAxiom

public InternalAxiom(Predicate head,
                     java.util.Vector<LogicalPrecondition> branchesIn,
                     java.util.Vector<java.lang.String> labelsIn)
To initialize an InternalAxiom object.

Parameters:
head - head of the axiom.
branchesIn - a Vector of logical expressions each of which represents a branch of the axiom.
labelsIn - a Vector of String labels.
Method Detail

toCode

public java.lang.String toCode()
This function produces the Java code needed to implement this axiom.

Specified by:
toCode in class CompileTimeObject
Returns:
the produced code as a String.