public class Comparative extends DLPElementAdapter implements DLPElement
Modifier and Type | Field and Description |
---|---|
private Term<?> |
left |
private java.lang.String |
operator |
private Term<?> |
right |
Constructor and Description |
---|
Comparative(Comparative other) |
Comparative(java.lang.String op,
Term<?> lefthand,
Term<?> righthand) |
Modifier and Type | Method and Description |
---|---|
Comparative |
clone()
Creates a deep copy of this formula
|
boolean |
equals(java.lang.Object obj) |
java.util.Set<DLPAtom> |
getAtoms()
Processes the set of all atoms which appear in this formula
|
Term<?> |
getLefthand() |
java.util.SortedSet<DLPLiteral> |
getLiterals() |
java.lang.String |
getOperator() |
java.util.Set<DLPPredicate> |
getPredicates()
Processes the set of all predicates which appear in this
formula
|
Term<?> |
getRighthand() |
FolSignature |
getSignature()
Returns the signature of the language of this formula.
|
java.util.Set<Term<?>> |
getTerms() |
int |
hashCode() |
Comparative |
substitute(Term<?> t,
Term<?> v)
Substitutes all occurrences of term "v" in this formula
by term "t" and returns the new formula.
|
java.lang.String |
toString() |
getPredicateCls
containsTermsOfType, exchange, getTerms, isGround, isLiteral, isWellFormed, substitute
finalize, getClass, notify, notifyAll, wait, wait, wait
exchange, isGround, isWellFormed, substitute
getPredicateCls, isLiteral
containsTermsOfType, getTerms
private Term<?> left
private Term<?> right
private java.lang.String operator
public Comparative(Comparative other)
public Term<?> getLefthand()
public Term<?> getRighthand()
public java.lang.String getOperator()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Set<Term<?>> getTerms()
getTerms
in interface LogicStructure
public java.util.SortedSet<DLPLiteral> getLiterals()
getLiterals
in interface DLPElement
public java.util.Set<DLPPredicate> getPredicates()
SimpleLogicalFormula
getPredicates
in interface SimpleLogicalFormula
getPredicates
in interface DLPElement
public java.util.Set<DLPAtom> getAtoms()
SimpleLogicalFormula
getAtoms
in interface SimpleLogicalFormula
getAtoms
in interface DLPElement
public Comparative substitute(Term<?> t, Term<?> v)
ComplexLogicalFormula
substitute
in interface ComplexLogicalFormula
substitute
in interface DLPElement
t
- the term to be substituted.v
- the term to substitute.public FolSignature getSignature()
Formula
getSignature
in interface Formula
getSignature
in interface DLPElement
public Comparative clone()
SimpleLogicalFormula
clone
in interface ComplexLogicalFormula
clone
in interface SimpleLogicalFormula
clone
in interface DLPElement
clone
in class DLPElementAdapter
public int hashCode()
hashCode
in interface SimpleLogicalFormula
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in interface SimpleLogicalFormula
equals
in class java.lang.Object