public class DLPAtom extends DLPElementAdapter implements DLPLiteral
| Modifier and Type | Field and Description |
|---|---|
protected List<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> |
arguments
a list of arguments of the atom
|
protected DLPPredicate |
pred
the predicate identifying the atom
|
| Constructor and Description |
|---|
DLPAtom()
Default-Ctor: Used for dynamic instantiation
|
DLPAtom(DLPAtom other)
Copy-Ctor: Generates a deep copy of the given atom
|
DLPAtom(net.sf.tweety.logics.fol.syntax.FOLAtom other)
Copy-Ctor: Generates a deep copy of the given FOL atom
|
DLPAtom(String symbol,
List<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> terms)
Creates a predicate for the atom from symbol name
and uses a list of terms as arguments for the atom.
|
DLPAtom(String symbol,
net.sf.tweety.logics.commons.syntax.interfaces.Term<?>... terms)
Ctor: Creates an atom with the given predicate as name and the
given terms as argument
|
| Modifier and Type | Method and Description |
|---|---|
void |
addArgument(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> arg) |
DLPAtom |
clone() |
DLPAtom |
cloneWithAddedTerm(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> tval)
Creates a copy of the literal and adds the
given term as argument to the end of the argument
list.
|
int |
compareTo(DLPLiteral o) |
DLPNeg |
complement() |
boolean |
equals(Object o) |
List<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> |
getArguments() |
int |
getArity() |
DLPAtom |
getAtom() |
Set<DLPAtom> |
getAtoms() |
SortedSet<DLPLiteral> |
getLiterals() |
String |
getName() |
DLPPredicate |
getPredicate() |
Set<DLPPredicate> |
getPredicates() |
net.sf.tweety.logics.fol.syntax.FolSignature |
getSignature() |
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> |
getTerm(int index) |
Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> |
getTerms() |
int |
hashCode() |
boolean |
isComplete() |
boolean |
isGround() |
net.sf.tweety.logics.commons.syntax.interfaces.Atom.RETURN_SET_PREDICATE |
setPredicate(net.sf.tweety.logics.commons.syntax.Predicate predicate) |
DLPAtom |
substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v,
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t) |
String |
toString() |
getPredicateClscontainsTermsOfType, exchange, getTerms, isLiteral, isWellFormed, substitutefinalize, getClass, notify, notifyAll, wait, wait, waitexchange, isWellFormed, substituteprotected DLPPredicate pred
protected List<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> arguments
public DLPAtom()
public DLPAtom(DLPAtom other)
other - The atom acting as source for the deep copypublic DLPAtom(net.sf.tweety.logics.fol.syntax.FOLAtom other)
other - The FOL atom acting as source for the deep copypublic DLPAtom(String symbol, net.sf.tweety.logics.commons.syntax.interfaces.Term<?>... terms)
symbol - The name of the atomterms - A list of Term> defining the arguments of the termpublic DLPAtom getAtom()
getAtom in interface DLPLiteralpublic int getArity()
public net.sf.tweety.logics.commons.syntax.interfaces.Term<?> getTerm(int index)
public DLPAtom cloneWithAddedTerm(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> tval)
DLPLiteralcloneWithAddedTerm in interface DLPLiteraltval - the new argument.public int hashCode()
public boolean equals(Object o)
public DLPAtom clone()
clone in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulaclone in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulaclone in interface DLPElementclone in class DLPElementAdapterpublic String getName()
getName in interface net.sf.tweety.logics.commons.syntax.interfaces.Atompublic boolean isGround()
isGround in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulaisGround in class net.sf.tweety.logics.commons.syntax.ComplexLogicalFormulaAdapterpublic DLPNeg complement()
complement in interface net.sf.tweety.logics.commons.syntax.interfaces.Invertablecomplement in interface DLPLiteralpublic DLPAtom substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t) throws IllegalArgumentException
substitute in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulasubstitute in interface DLPElementsubstitute in interface DLPLiteralIllegalArgumentExceptionpublic Set<DLPAtom> getAtoms()
getAtoms in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulagetAtoms in interface DLPElementpublic Set<DLPPredicate> getPredicates()
getPredicates in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulagetPredicates in interface DLPElementpublic net.sf.tweety.logics.fol.syntax.FolSignature getSignature()
getSignature in interface net.sf.tweety.commons.FormulagetSignature in interface DLPElementpublic Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> getTerms()
getTerms in interface net.sf.tweety.logics.commons.syntax.interfaces.LogicStructurepublic DLPPredicate getPredicate()
getPredicate in interface net.sf.tweety.logics.commons.syntax.interfaces.Atompublic net.sf.tweety.logics.commons.syntax.interfaces.Atom.RETURN_SET_PREDICATE setPredicate(net.sf.tweety.logics.commons.syntax.Predicate predicate)
setPredicate in interface net.sf.tweety.logics.commons.syntax.interfaces.Atompublic void addArgument(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> arg)
throws net.sf.tweety.logics.commons.error.LanguageException
addArgument in interface net.sf.tweety.logics.commons.syntax.interfaces.Atomnet.sf.tweety.logics.commons.error.LanguageExceptionpublic List<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> getArguments()
getArguments in interface net.sf.tweety.logics.commons.syntax.interfaces.Atompublic boolean isComplete()
isComplete in interface net.sf.tweety.logics.commons.syntax.interfaces.Atompublic SortedSet<DLPLiteral> getLiterals()
getLiterals in interface DLPElementpublic int compareTo(DLPLiteral o)
compareTo in interface Comparable<DLPLiteral>Copyright © 2018. All rights reserved.