public class DLPNeg extends DLPElementAdapter implements DLPLiteral
Atom.AtomImpl, Atom.RETURN_SET_PREDICATE| Constructor and Description |
|---|
DLPNeg(DLPAtom inner) |
DLPNeg(DLPNeg other) |
DLPNeg(java.lang.String expr) |
DLPNeg(java.lang.String symbol,
java.util.List<Term<?>> terms)
Default constructor, creates an atom from a functor name
and a list of terms.
|
DLPNeg(java.lang.String symbol,
Term<?>... terms) |
| Modifier and Type | Method and Description |
|---|---|
void |
addArgument(Term<?> arg)
Adds an argument to the atom's argument list
|
DLPNeg |
clone()
Creates a deep copy of this formula
|
DLPLiteral |
cloneWithAddedTerm(Term<?> term)
Creates a copy of the literal and adds the
given term as argument to the end of the argument
list.
|
int |
compareTo(DLPLiteral o) |
DLPAtom |
complement() |
boolean |
equals(java.lang.Object o) |
java.util.List<? extends Term<?>> |
getArguments() |
DLPAtom |
getAtom() |
java.util.Set<DLPAtom> |
getAtoms()
Processes the set of all atoms which appear in this formula
|
java.util.SortedSet<DLPLiteral> |
getLiterals() |
java.lang.String |
getName() |
DLPPredicate |
getPredicate() |
java.util.Set<DLPPredicate> |
getPredicates()
Processes the set of all predicates which appear in this
formula
|
FolSignature |
getSignature()
Returns the signature of the language of this formula.
|
java.util.Set<Term<?>> |
getTerms() |
int |
hashCode() |
boolean |
isComplete() |
boolean |
isGround()
Checks whether this formula is ground, i.e.
|
Atom.RETURN_SET_PREDICATE |
setPredicate(Predicate predicate)
Changes the predicate of the atom.
|
DLPNeg |
substitute(Term<?> v,
Term<?> t)
Substitutes all occurrences of term "v" in this formula
by term "t" and returns the new formula.
|
java.lang.String |
toString() |
getPredicateClscontainsTermsOfType, exchange, getTerms, isLiteral, isWellFormed, substitutefinalize, getClass, notify, notifyAll, wait, wait, waitexchange, isWellFormed, substitutegetPredicateCls, isLiteralcontainsTermsOfType, getTermsDLPAtom atom
public DLPNeg(DLPAtom inner)
public DLPNeg(DLPNeg other)
public DLPNeg(java.lang.String symbol,
Term<?>... terms)
public DLPNeg(java.lang.String symbol,
java.util.List<Term<?>> terms)
symbol - the functor nameterms - the terms (arguments) of the atompublic DLPNeg(java.lang.String expr)
public DLPAtom getAtom()
getAtom in interface DLPLiteralpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in interface SimpleLogicalFormulaequals in class java.lang.Objectpublic boolean isGround()
ComplexLogicalFormulaisGround in interface ComplexLogicalFormulaisGround in class ComplexLogicalFormulaAdapterpublic DLPNeg clone()
SimpleLogicalFormulaclone in interface ComplexLogicalFormulaclone in interface SimpleLogicalFormulaclone in interface DLPElementclone in class DLPElementAdapterpublic DLPAtom complement()
complement in interface Invertablecomplement in interface DLPLiteralpublic DLPLiteral cloneWithAddedTerm(Term<?> term)
DLPLiteralcloneWithAddedTerm in interface DLPLiteralterm - the new argument.public int hashCode()
hashCode in interface SimpleLogicalFormulahashCode in class java.lang.Objectpublic DLPNeg substitute(Term<?> v, Term<?> t) throws java.lang.IllegalArgumentException
ComplexLogicalFormulasubstitute in interface ComplexLogicalFormulasubstitute in interface DLPElementsubstitute in interface DLPLiteralv - the term to be substituted.t - the term to substitute.java.lang.IllegalArgumentException - if "v" and "t" are of different sortspublic java.util.Set<DLPAtom> getAtoms()
SimpleLogicalFormulagetAtoms in interface SimpleLogicalFormulagetAtoms in interface DLPElementpublic java.util.Set<DLPPredicate> getPredicates()
SimpleLogicalFormulagetPredicates in interface SimpleLogicalFormulagetPredicates in interface DLPElementpublic FolSignature getSignature()
FormulagetSignature in interface FormulagetSignature in interface DLPElementpublic java.util.Set<Term<?>> getTerms()
getTerms in interface LogicStructurepublic java.lang.String getName()
public DLPPredicate getPredicate()
getPredicate in interface Atompublic Atom.RETURN_SET_PREDICATE setPredicate(Predicate predicate)
AtomsetPredicate in interface Atompublic void addArgument(Term<?> arg) throws LanguageException
AtomaddArgument in interface Atomarg - The next argumentLanguageException - If the language does not support
arguments for their constructs.public java.util.List<? extends Term<?>> getArguments()
getArguments in interface Atompublic boolean isComplete()
isComplete in interface Atompublic java.util.SortedSet<DLPLiteral> getLiterals()
getLiterals in interface DLPElementpublic int compareTo(DLPLiteral o)
compareTo in interface java.lang.Comparable<DLPLiteral>