org.deri.iris.terms
Class ConstructedTerm

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

public class ConstructedTerm
extends Object
implements IConstructedTerm

Simple implementation of the IConstructedTerm.

$Id$

Version:
$Revision$
Author:
Richard P??ttler (richard dot poettler at deri dot at), Darko Anicic, DERI Innsbruck

Method Summary
 int compareTo(ITerm o)
           
 boolean equals(Object o)
           
 String getFunctionSymbol()
          Get the name of the constructed term (function symbol).
 List<ITerm> getParameters()
          Returns a list of all terms from this constructed term (function symbol).
 List<ITerm> getValue()
          Returns a vale of the term.
 Set<IVariable> getVariables()
          Returns all distinct variables from this tuple.
 int hashCode()
           
 boolean isGround()
          Checks whether the term is ground (a term with no variables).
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getFunctionSymbol

public String getFunctionSymbol()
Description copied from interface: IConstructedTerm
Get the name of the constructed term (function symbol).

Specified by:
getFunctionSymbol in interface IConstructedTerm
Returns:
The name of the constructed term.

getParameters

public List<ITerm> getParameters()
Description copied from interface: IConstructedTerm
Returns a list of all terms from this constructed term (function symbol).

Specified by:
getParameters in interface IConstructedTerm
Returns:
List of all terms from this constructed term.

getValue

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

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

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.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

equals

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

compareTo

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

getVariables

public Set<IVariable> getVariables()
Description copied from interface: IConstructedTerm
Returns all distinct variables from this tuple.

Specified by:
getVariables in interface IConstructedTerm
Returns:
All distinct variables from this tuple.