Class Variable
- java.lang.Object
-
- net.sf.tweety.logics.commons.syntax.TermAdapter<java.lang.String>
-
- net.sf.tweety.logics.commons.syntax.StringTerm
-
- net.sf.tweety.logics.commons.syntax.Variable
-
- All Implemented Interfaces:
LogicStructure
,Term<java.lang.String>
public class Variable extends StringTerm
A Variable is a placeholder for Constants in a generic formula of a logic language. For example, wife_of(X,Y) represents all wifes X and their specific husbands Y using the two Variables X,Y. It is implemented as a specialized StringTerm which only allows names which have an upper-case character as first letter.- Author:
- Tim Janus, Anna Gessler
-
-
Constructor Summary
Constructors Constructor Description Variable(java.lang.String name)
Ctor: Creates a new Variable with the given name and the default Sort "Thing".Variable(java.lang.String name, Sort sort)
Ctor: Creates a new Variable with the given name and sort.Variable(Variable other)
Copy-Ctor: Creates a deep copy of the given Variable
-
Method Summary
-
Methods inherited from class net.sf.tweety.logics.commons.syntax.StringTerm
get, toString
-
Methods inherited from class net.sf.tweety.logics.commons.syntax.TermAdapter
containsTermsOfType, equals, getSort, getTerms, getTerms, hashCode, substitute
-
-
-
-
Constructor Detail
-
Variable
public Variable(java.lang.String name)
Ctor: Creates a new Variable with the given name and the default Sort "Thing".- Parameters:
name
- The name of the Variable has to start with an upper-case character.
-
Variable
public Variable(java.lang.String name, Sort sort)
Ctor: Creates a new Variable with the given name and sort.- Parameters:
name
- The name of the Variable has to start with an upper-case character.sort
- The Sort (type) of the Variable.
-
Variable
public Variable(Variable other)
Copy-Ctor: Creates a deep copy of the given Variable- Parameters:
other
- The Variable that acts as source for the copy.
-
-
Method Detail
-
set
public void set(java.lang.String value)
Description copied from interface:Term
Changes the java-object representation of the term to the given value.- Specified by:
set
in interfaceTerm<java.lang.String>
- Specified by:
set
in classStringTerm
- Parameters:
value
- The new java-object representation of the term.
-
-