org.deri.iris.basics
Class Atom

java.lang.Object
  extended by org.deri.iris.basics.Atom
All Implemented Interfaces:
Comparable<IAtom>, IAtom

public class Atom
extends Object
implements IAtom

A simple Atom implementation.

$Id$

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

Method Summary
 int compareTo(IAtom o)
           
 boolean equals(Object o)
           
 IPredicate getPredicate()
           Returns the predicate symbol of the atom.
 ITuple getTuple()
           Returns the tuple of the atom.
 int hashCode()
           
 boolean isBuiltin()
          Returns whether this atom is a builtin one, or not.
 boolean isGround()
           Checks whether the atom is grounded (tuple contains no variables).
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getPredicate

public IPredicate getPredicate()
Description copied from interface: IAtom

Returns the predicate symbol of the atom.

Specified by:
getPredicate in interface IAtom
Returns:
The predicate symbol.

getTuple

public ITuple getTuple()
Description copied from interface: IAtom

Returns the tuple of the atom.

Specified by:
getTuple in interface IAtom
Returns:
The tuple.

isGround

public boolean isGround()
Description copied from interface: IAtom

Checks whether the atom is grounded (tuple contains no variables).

Specified by:
isGround in interface IAtom
Returns:
True if the atom is grounded, otherwise false.

compareTo

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

toString

public String toString()
Overrides:
toString in class Object

isBuiltin

public boolean isBuiltin()
Description copied from interface: IAtom
Returns whether this atom is a builtin one, or not.

Specified by:
isBuiltin in interface IAtom
Returns:
true if it is builtin, otherwise false