public class ASPAtom extends ASPLiteral
| 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 net.sf.tweety.logics.commons.syntax.Predicate |
predicate
The predicate identifying the atom
|
| Constructor and Description |
|---|
ASPAtom()
Empty constructor.
|
ASPAtom(ASPAtom other)
Copy-Constructor: Generates a deep copy of the given ASP atom.
|
ASPAtom(net.sf.tweety.logics.fol.syntax.FolAtom other)
Copy-Constructor: Generates a deep copy of the given FOL atom.
|
ASPAtom(net.sf.tweety.logics.commons.syntax.Predicate p)
Creates a new ASPAtom with the given predicate.
|
ASPAtom(net.sf.tweety.logics.commons.syntax.Predicate p,
List<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> terms)
Creates a new atom with the given predicate and terms.
|
ASPAtom(String name)
Creates a new atom with the given predicate name and no terms.
|
ASPAtom(String symbol,
net.sf.tweety.logics.commons.syntax.interfaces.Term<?>... terms)
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) |
ASPAtom |
clone() |
ASPAtom |
cloneWithAddedTerm(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> term)
Creates a copy of the literal and adds the
given term as argument to the end of the argument
list.
|
int |
compareTo(ASPLiteral o) |
ASPLiteral |
complement() |
boolean |
equals(Object o) |
List<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> |
getArguments() |
ASPAtom |
getAtom() |
Set<ASPAtom> |
getAtoms() |
SortedSet<ASPLiteral> |
getLiterals()
Returns all literals in this element in form of a SortedSet.
|
String |
getName() |
net.sf.tweety.logics.commons.syntax.Predicate |
getPredicate() |
Set<net.sf.tweety.logics.commons.syntax.Predicate> |
getPredicates() |
net.sf.tweety.logics.fol.syntax.FolSignature |
getSignature() |
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> |
getTerm(int i) |
Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> |
getTerms() |
<C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> |
getTerms(Class<C> cls) |
int |
hashCode() |
boolean |
isComplete() |
net.sf.tweety.logics.commons.syntax.interfaces.Atom.RETURN_SET_PREDICATE |
setPredicate(net.sf.tweety.logics.commons.syntax.Predicate newer) |
ASPAtom |
substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v,
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t) |
String |
toString() |
isLiteralcontainsTermsOfType, exchange, getPredicateCls, isGround, isWellFormed, substituteprotected net.sf.tweety.logics.commons.syntax.Predicate predicate
protected List<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> arguments
public ASPAtom()
public ASPAtom(net.sf.tweety.logics.commons.syntax.Predicate p,
List<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> terms)
p - a predicateterms - arguments of the atompublic ASPAtom(String name)
name - public ASPAtom(net.sf.tweety.logics.fol.syntax.FolAtom other)
other - The FOL atom acting as source for the deep copypublic ASPAtom(ASPAtom other)
other - The atom acting as source for the deep copypublic ASPAtom(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 ASPAtom(net.sf.tweety.logics.commons.syntax.Predicate p)
p - public String getName()
public SortedSet<ASPLiteral> getLiterals()
ASPBodyElementgetLiterals in class ASPBodyElementpublic Set<net.sf.tweety.logics.commons.syntax.Predicate> getPredicates()
getPredicates in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulagetPredicates in class ASPElementpublic Set<ASPAtom> getAtoms()
getAtoms in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulagetAtoms in class ASPElementpublic net.sf.tweety.logics.fol.syntax.FolSignature getSignature()
getSignature in interface net.sf.tweety.commons.FormulagetSignature in class ASPElementpublic ASPAtom clone()
clone in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulaclone in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulaclone in class ASPElementpublic Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> getTerms()
public <C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> Set<C> getTerms(Class<C> cls)
public net.sf.tweety.logics.commons.syntax.Predicate getPredicate()
public net.sf.tweety.logics.commons.syntax.interfaces.Atom.RETURN_SET_PREDICATE setPredicate(net.sf.tweety.logics.commons.syntax.Predicate newer)
public void addArgument(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> arg)
throws net.sf.tweety.logics.commons.error.LanguageException
net.sf.tweety.logics.commons.error.LanguageExceptionpublic List<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> getArguments()
public boolean isComplete()
public int compareTo(ASPLiteral o)
public ASPAtom cloneWithAddedTerm(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> term)
ASPLiteralcloneWithAddedTerm in class ASPLiteralterm - the new argument.public ASPAtom getAtom()
getAtom in class ASPLiteralpublic ASPLiteral complement()
complement in interface net.sf.tweety.logics.commons.syntax.interfaces.Invertablecomplement in class ASPLiteralpublic ASPAtom 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 class ASPBodyElementIllegalArgumentExceptionpublic net.sf.tweety.logics.commons.syntax.interfaces.Term<?> getTerm(int i)
public boolean equals(Object o)
Copyright © 2019. All rights reserved.