tuffy.mln
Class Term

java.lang.Object
  extended by tuffy.mln.Term

public class Term
extends java.lang.Object

A term in first-order logic; either a variable or a constant.


Field Summary
private  java.lang.Integer constantID
          The ID of this term.
 boolean isOriAConstant
           
private  boolean isVariable
          Whether this term is a variable.
 int oriConstantID
           
private  java.lang.String var
          The name of this term.
 
Constructor Summary
Term(java.lang.Integer cid)
          Constructor a Term (constant version).
Term(java.lang.String var)
          Constructor of Term (variable version).
 
Method Summary
 int constant()
           
 boolean isConstant()
           
 boolean isVariable()
          Return whether this term is a variable.
 java.lang.String toString()
           
 java.lang.String var()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isVariable

private boolean isVariable
Whether this term is a variable.


isOriAConstant

public boolean isOriAConstant

oriConstantID

public int oriConstantID

var

private java.lang.String var
The name of this term. $var$ is not null iff. this term is a variable.


constantID

private java.lang.Integer constantID
The ID of this term. $constantID$ is not null iff. this term is a constant.

Constructor Detail

Term

public Term(java.lang.String var)
Constructor of Term (variable version).

Parameters:
var - name of the variable

Term

public Term(java.lang.Integer cid)
Constructor a Term (constant version).

Parameters:
cid - the constant in the form of its integer ID
Method Detail

isVariable

public boolean isVariable()
Return whether this term is a variable.


isConstant

public boolean isConstant()
Returns:
Whether this term is a constant.

var

public java.lang.String var()
Returns:
The name of this term, which is null when it is a constant.

constant

public int constant()
Returns:
The name of this term, which is null when it is a variable.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
This term's human-friendly representation.