org.deri.iris.basics
Class Literal

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

public class Literal
extends Object
implements ILiteral

Simple literal implementation.

$Id$

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

Method Summary
 int compareTo(ILiteral oo)
           
 boolean equals(Object o)
           
 IAtom getAtom()
           Returns the atom of this literal.
 int hashCode()
           
 boolean isPositive()
           Checks whether the literal is a positive atomic formula or a negated atomic formula.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

isPositive

public boolean isPositive()
Description copied from interface: ILiteral

Checks whether the literal is a positive atomic formula or a negated atomic formula.

Specified by:
isPositive in interface ILiteral
Returns:
True if the literal is a positive atomic formula; false otherwise.

getAtom

public IAtom getAtom()
Description copied from interface: ILiteral

Returns the atom of this literal.

Specified by:
getAtom in interface ILiteral
Returns:
The atom.

compareTo

public int compareTo(ILiteral oo)
Specified by:
compareTo in interface Comparable<ILiteral>

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