Package net.sf.tweety.lp.asp.syntax
Class ArithmeticTerm
- java.lang.Object
-
- net.sf.tweety.logics.commons.syntax.TermAdapter<net.sf.tweety.commons.util.Triple<ASPOperator.ArithmeticOperator,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>>>
-
- net.sf.tweety.lp.asp.syntax.ArithmeticTerm
-
- All Implemented Interfaces:
net.sf.tweety.logics.commons.syntax.interfaces.LogicStructure,net.sf.tweety.logics.commons.syntax.interfaces.Term<net.sf.tweety.commons.util.Triple<ASPOperator.ArithmeticOperator,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>>>
public class ArithmeticTerm extends net.sf.tweety.logics.commons.syntax.TermAdapter<net.sf.tweety.commons.util.Triple<ASPOperator.ArithmeticOperator,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>>>
This class represents an arithmetic term in the ASP-Core-2 format. An arithmetic term is either -(t) or (t x u), where t and u are Terms and x is one of +,-,*,/- Author:
- Anna Gessler
-
-
Constructor Summary
Constructors Constructor Description ArithmeticTerm(net.sf.tweety.commons.util.Triple<ASPOperator.ArithmeticOperator,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> triple)ArithmeticTerm(ArithmeticTerm other)ArithmeticTerm(ASPOperator.ArithmeticOperator op, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)Creates an arithmetic term of the form -(t)ArithmeticTerm(ASPOperator.ArithmeticOperator op, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> left, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> right)
-
Method Summary
Modifier and Type Method Description net.sf.tweety.logics.commons.syntax.TermAdapter<?>clone()net.sf.tweety.logics.commons.syntax.interfaces.Term<?>getLeft()Returns the left subterm of this arithmetic term.ASPOperator.ArithmeticOperatorgetOperator()Returns the operator of this arithmetic term.net.sf.tweety.logics.commons.syntax.interfaces.Term<?>getRight()Returns the right subterm of this arithmetic term.voidsetOperator(ASPOperator.ArithmeticOperator op)Sets the operator of this arithmetic term.StringtoString()
-
-
-
Constructor Detail
-
ArithmeticTerm
public ArithmeticTerm(net.sf.tweety.commons.util.Triple<ASPOperator.ArithmeticOperator,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> triple)
-
ArithmeticTerm
public ArithmeticTerm(ArithmeticTerm other)
-
ArithmeticTerm
public ArithmeticTerm(ASPOperator.ArithmeticOperator op, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> left, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> right)
-
ArithmeticTerm
public ArithmeticTerm(ASPOperator.ArithmeticOperator op, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)
Creates an arithmetic term of the form -(t)- Parameters:
op- an operatort- a term
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toStringin classnet.sf.tweety.logics.commons.syntax.TermAdapter<net.sf.tweety.commons.util.Triple<ASPOperator.ArithmeticOperator,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>>>
-
clone
public net.sf.tweety.logics.commons.syntax.TermAdapter<?> clone()
- Specified by:
clonein interfacenet.sf.tweety.logics.commons.syntax.interfaces.Term<net.sf.tweety.commons.util.Triple<ASPOperator.ArithmeticOperator,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>>>- Specified by:
clonein classnet.sf.tweety.logics.commons.syntax.TermAdapter<net.sf.tweety.commons.util.Triple<ASPOperator.ArithmeticOperator,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>>>
-
getOperator
public ASPOperator.ArithmeticOperator getOperator()
Returns the operator of this arithmetic term.- Returns:
- an arithmetic operator
-
setOperator
public void setOperator(ASPOperator.ArithmeticOperator op)
Sets the operator of this arithmetic term.- Parameters:
op- an arithmetic operator
-
getLeft
public net.sf.tweety.logics.commons.syntax.interfaces.Term<?> getLeft()
Returns the left subterm of this arithmetic term.- Returns:
- left term
-
getRight
public net.sf.tweety.logics.commons.syntax.interfaces.Term<?> getRight()
Returns the right subterm of this arithmetic term.- Returns:
- right term
-
-