Class NumberTerm
- java.lang.Object
-
- net.sf.tweety.logics.commons.syntax.TermAdapter<java.lang.Integer>
-
- net.sf.tweety.logics.commons.syntax.NumberTerm
-
- All Implemented Interfaces:
LogicStructure
,Term<java.lang.Integer>
public class NumberTerm extends TermAdapter<java.lang.Integer>
This is a term representing an integer number it is used to distinguish between objects like an auto a which is modeled as constant and integral numbers like 42.- Author:
- Tim Janus
-
-
Constructor Summary
Constructors Constructor Description NumberTerm(int number)
Ctor: Creates a new NumberTerm, the sort "Thing" is used.NumberTerm(int number, Sort sort)
Ctor: Creates a new NumberTerm using the sort and the value given as parameter.NumberTerm(java.lang.String number)
Ctor: Creates a new NumberTerm, the sort "Thing" is used.NumberTerm(java.lang.String number, Sort sort)
Ctor: Creates a new NumberTerm using the sort and the value given as parameter.NumberTerm(NumberTerm other)
Copy-Ctor: Creates a deep copy of the given NumberTerm
-
Method Summary
Modifier and Type Method Description NumberTerm
clone()
Creates a deep copy of the term-
Methods inherited from class net.sf.tweety.logics.commons.syntax.TermAdapter
containsTermsOfType, equals, get, getSort, getTerms, getTerms, hashCode, set, substitute, toString
-
-
-
-
Constructor Detail
-
NumberTerm
public NumberTerm(int number)
Ctor: Creates a new NumberTerm, the sort "Thing" is used.- Parameters:
number
- the value of the number term
-
NumberTerm
public NumberTerm(int number, Sort sort)
Ctor: Creates a new NumberTerm using the sort and the value given as parameter.- Parameters:
number
- The value of the number termsort
- The sort representing the type of the number term
-
NumberTerm
public NumberTerm(java.lang.String number)
Ctor: Creates a new NumberTerm, the sort "Thing" is used.- Parameters:
number
- The value of the number term as string
-
NumberTerm
public NumberTerm(java.lang.String number, Sort sort)
Ctor: Creates a new NumberTerm using the sort and the value given as parameter.- Parameters:
number
- The value of the number term as stringsort
- The sort representing the type of the number term
-
NumberTerm
public NumberTerm(NumberTerm other)
Copy-Ctor: Creates a deep copy of the given NumberTerm- Parameters:
other
- The NumberTerm that is the source for the copy.
-
-
Method Detail
-
clone
public NumberTerm clone()
Description copied from interface:Term
Creates a deep copy of the term- Specified by:
clone
in interfaceTerm<java.lang.Integer>
- Specified by:
clone
in classTermAdapter<java.lang.Integer>
- Returns:
- the clone
-
-