public override bool Equals(Object o)
{
if (this == o)
{
return true;
}
if (o.GetType() != this.GetType())
{
// This prevents ReducedLiterals
// being treated as equivalent to
// normal Literals.
return false;
}
if (!(o is Literal))
{
return false;
}
Literal l = (Literal)o;
return l.isPositiveLiteral() == isPositiveLiteral()
&& l.getAtomicSentence().getSymbolicName().Equals(
atom.getSymbolicName())
&& l.getAtomicSentence().getArgs().Equals(atom.getArgs());
}