org.deri.iris.terms
Class Variable

java.lang.Object
  extended by org.deri.iris.terms.Variable
All Implemented Interfaces:
Comparable<ITerm>, ITerm, IVariable

public class Variable
extends Object
implements IVariable

Simple implementation of the IVariable.

$Id$

Version:
$Revision$
Author:
Richard P??ttler (richard dot poettler at deri dot at)

Method Summary
 int compareTo(ITerm o)
           
 boolean equals(Object o)
           
 String getValue()
          Returns a vale of the term.
 int hashCode()
           
 boolean isGround()
          Checks whether the term is ground (a term with no variables).
 String toString()
          Returns a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

isGround

public boolean isGround()
Description copied from interface: ITerm
Checks whether the term is ground (a term with no variables).

Specified by:
isGround in interface ITerm
Returns:
true if the term is ground, otherwise false.

compareTo

public int compareTo(ITerm o)
Specified by:
compareTo in interface Comparable<ITerm>

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Returns a String representation of this object. The subject of the string format is to change. An example return value might be "?date"

Overrides:
toString in class Object
Returns:
the String representation

getValue

public String getValue()
Description copied from interface: ITerm
Returns a vale of the term.

Specified by:
getValue in interface ITerm
Specified by:
getValue in interface IVariable
Returns:
The term value.