public class FunctionalTerm extends TermAdapter<net.sf.tweety.commons.util.Pair<Functor,List<Term<?>>>>
value| Constructor and Description |
|---|
FunctionalTerm(FunctionalTerm other) |
FunctionalTerm(Functor functor)
Creates a new functional term with the given functor.
|
FunctionalTerm(Functor functor,
List<Term<?>> arguments)
Creates a new functional term with the given functor and the given list
of arguments.
|
FunctionalTerm(Functor functor,
Term<?>... terms) |
| Modifier and Type | Method and Description |
|---|---|
FunctionalTerm |
addArgument(Term<?> term)
Appends the given argument to this term's
arguments and returns itself.
|
FunctionalTerm |
clone()
Creates a deep copy of the term
|
List<Term<?>> |
getArguments() |
Functor |
getFunctor() |
Set<Term<?>> |
getTerms() |
<C extends Term<?>> |
getTerms(Class<C> cls)
Processes the set containing all terms of type C.
|
boolean |
isComplete()
Checks whether this term is complete, i.e.
|
Term<?> |
substitute(Term<?> v,
Term<?> t)
Substitutes all occurrences of term "v" in this term
by term "t" and returns the new term.
|
String |
toString() |
containsTermsOfType, equals, get, getSort, hashCode, setpublic FunctionalTerm(Functor functor, List<Term<?>> arguments)
functor - the functor of this termarguments - the list of arguments of this functional termpublic FunctionalTerm(FunctionalTerm other)
public FunctionalTerm(Functor functor)
functor - public Functor getFunctor()
public boolean isComplete()
public FunctionalTerm addArgument(Term<?> term) throws IllegalArgumentException
term - an argument to be addedIllegalArgumentException - if the given term does not correspond
to the expected sort or the argument list is complete.public Set<Term<?>> getTerms()
getTerms in interface LogicStructuregetTerms in class TermAdapter<net.sf.tweety.commons.util.Pair<Functor,List<Term<?>>>>public <C extends Term<?>> Set<C> getTerms(Class<C> cls)
LogicStructuregetTerms in interface LogicStructuregetTerms in class TermAdapter<net.sf.tweety.commons.util.Pair<Functor,List<Term<?>>>>cls - The Class structure containing type information about the
searched termpublic Term<?> substitute(Term<?> v, Term<?> t) throws IllegalArgumentException
Termsubstitute in interface Term<net.sf.tweety.commons.util.Pair<Functor,List<Term<?>>>>substitute in class TermAdapter<net.sf.tweety.commons.util.Pair<Functor,List<Term<?>>>>v - the term to be substituted.t - the term to substitute.IllegalArgumentException - if "v" and "t" are of different sorts
(NOTE: this exception is only thrown when "v" actually appears in this
formula)public String toString()
toString in class TermAdapter<net.sf.tweety.commons.util.Pair<Functor,List<Term<?>>>>Copyright © 2018. All rights reserved.