T - The type of the value saved in the term, this might be a string
if the term is a constant or a variable, or it might be an integer
if the term is a number term.public abstract class TermAdapter<T> extends Object implements Term<T>
| Constructor and Description |
|---|
TermAdapter(T value)
Default-Ctor: Creates an TermAdapter with the Sort "Thing"
|
TermAdapter(T value,
Sort sort)
Ctor: Creates a TermAdapter with the given Sort
|
| Modifier and Type | Method and Description |
|---|---|
abstract TermAdapter<?> |
clone()
Creates a deep copy of the term
|
<C extends Term<?>> |
containsTermsOfType(Class<C> cls)
Checks if this logical structure contains at least one term of type C.
|
boolean |
equals(Object obj) |
T |
get() |
Sort |
getSort() |
Set<Term<?>> |
getTerms() |
<C extends Term<?>> |
getTerms(Class<C> cls)
Processes the set containing all terms of type C.
|
int |
hashCode() |
void |
set(T value)
Changes the java-object representation of the term to the
given value.
|
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() |
protected T value
public TermAdapter(T value)
public Set<Term<?>> getTerms()
getTerms in interface LogicStructurepublic <C extends Term<?>> Set<C> getTerms(Class<C> cls)
LogicStructuregetTerms in interface LogicStructurecls - The Class structure containing type information about the
searched termpublic <C extends Term<?>> boolean containsTermsOfType(Class<C> cls)
LogicStructurecontainsTermsOfType in interface LogicStructurecls - The class structure representing the type C of the term.public Term<?> substitute(Term<?> v, Term<?> t) throws IllegalArgumentException
Termsubstitute in interface Term<T>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 Sort getSort()
public abstract TermAdapter<?> clone()
Termpublic void set(T value)
TermCopyright © 2018. All rights reserved.