public class FunctionalTerm extends TermAdapter<Pair<Functor,java.util.List<Term<?>>>>
value
Constructor and Description |
---|
FunctionalTerm(FunctionalTerm other) |
FunctionalTerm(Functor functor)
Creates a new functional term with the given functor.
|
FunctionalTerm(Functor functor,
java.util.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
|
java.util.List<Term<?>> |
getArguments() |
Functor |
getFunctor() |
java.util.Set<Term<?>> |
getTerms() |
<C extends Term<?>> |
getTerms(java.lang.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.
|
java.lang.String |
toString() |
containsTermsOfType, equals, get, getSort, hashCode, set
public FunctionalTerm(Functor functor, java.util.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 java.util.List<Term<?>> getArguments()
public boolean isComplete()
public FunctionalTerm addArgument(Term<?> term) throws java.lang.IllegalArgumentException
term
- an argument to be addedjava.lang.IllegalArgumentException
- if the given term does not correspond
to the expected sort or the argument list is complete.public java.util.Set<Term<?>> getTerms()
getTerms
in interface LogicStructure
getTerms
in class TermAdapter<Pair<Functor,java.util.List<Term<?>>>>
public <C extends Term<?>> java.util.Set<C> getTerms(java.lang.Class<C> cls)
LogicStructure
getTerms
in interface LogicStructure
getTerms
in class TermAdapter<Pair<Functor,java.util.List<Term<?>>>>
cls
- The Class structure containing type information about the
searched termpublic Term<?> substitute(Term<?> v, Term<?> t) throws java.lang.IllegalArgumentException
Term
substitute
in interface Term<Pair<Functor,java.util.List<Term<?>>>>
substitute
in class TermAdapter<Pair<Functor,java.util.List<Term<?>>>>
v
- the term to be substituted.t
- the term to substitute.java.lang.IllegalArgumentException
- if "v" and "t" are of different sorts
(NOTE: this exception is only thrown when "v" actually appears in this
formula)public java.lang.String toString()
toString
in class TermAdapter<Pair<Functor,java.util.List<Term<?>>>>