Class Constant
- 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.Constant
-
- All Implemented Interfaces:
LogicStructure
,Term<java.lang.String>
- Direct Known Subclasses:
Individual
public class Constant extends StringTerm
A Constant represents an constant object in the world of a logical language. It is implemented as a specialized StringTerm.- Author:
- Tim Janus
-
-
Constructor Summary
Constructors Constructor Description Constant(java.lang.String name)
Ctor: Creates a new Constant with the given name, uses "Thing" as sort.Constant(java.lang.String name, Sort sort)
Ctor: Creates a new Constant with the given name and sortConstant(Constant other)
Copy-Ctor: Creates a deep copy of the given Constant
-
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
-
Constant
public Constant(java.lang.String name)
Ctor: Creates a new Constant with the given name, uses "Thing" as sort.- Parameters:
name
- The name of the Constant
-
Constant
public Constant(java.lang.String name, Sort sort)
Ctor: Creates a new Constant with the given name and sort- Parameters:
name
- The name of the Constantsort
- The sort of the Constant
-
Constant
public Constant(Constant other)
Copy-Ctor: Creates a deep copy of the given Constant- Parameters:
other
- The Constant 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.
-
-