public class ArithmeticOperationInfo extends Object implements Cloneable, Serializable
ArithmeticOperationInfo
class represents the result value from an arithmetic operation between
ArithmeticOrRelationalOperand
objects. It consists of a tag identifying the operation type and two operands
specifying the values to compare.
Note
This operand is used in RelationalOperationInfo
operation as well.
Refs: QualifierInfo
Modifier and Type | Field and Description |
---|---|
static int |
AR_ARITH_OP_ADD
AR_ARITH_OP_ADD adds the left and right operands. |
static int |
AR_ARITH_OP_DIVIDE
AR_ARITH_OP_DIVIDE divides the left operand by the right operand. |
static int |
AR_ARITH_OP_MODULO
AR_ARITH_OP_MODULO finds the remainder after dividing the left operand by
the right operand. |
static int |
AR_ARITH_OP_MULTIPLY
AR_ARITH_OP_MULTIPLY multiplies the left and right operands. |
static int |
AR_ARITH_OP_NEGATE
AR_ARITH_OP_NEGATE changes the sign of the right operand (left operand is
ignored). |
static int |
AR_ARITH_OP_SUBTRACT
AR_ARITH_OP_SUBTRACT subtracts the right operand from the left operand. |
Constructor and Description |
---|
ArithmeticOperationInfo() |
ArithmeticOperationInfo(int operation,
ArithmeticOrRelationalOperand op1,
ArithmeticOrRelationalOperand op2) |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clone implementation that returns an Object with data cloned from self
|
boolean |
equals(Object obj)
Use this method for checking equality between the current object and the
provided one.
|
ArithmeticOrRelationalOperand |
getLeftOperand()
Returns value of left operand of operation.
|
int |
getOperation()
Returns arithmetic operation used in qualification.
|
ArithmeticOrRelationalOperand |
getRightOperand()
Returns value of right operand of operation.
|
int |
hashCode()
Returns the hash code value for this instance of the current class.
|
void |
setOperandLeft(ArithmeticOrRelationalOperand left) |
void |
setOperandRight(ArithmeticOrRelationalOperand right) |
void |
setOperation(int m_operation) |
String |
toString()
Returns a string description of the object.
|
public static final int AR_ARITH_OP_ADD
AR_ARITH_OP_ADD
adds the left and right operands.public static final int AR_ARITH_OP_SUBTRACT
AR_ARITH_OP_SUBTRACT
subtracts the right operand from the left operand.public static final int AR_ARITH_OP_MULTIPLY
AR_ARITH_OP_MULTIPLY
multiplies the left and right operands.public static final int AR_ARITH_OP_DIVIDE
AR_ARITH_OP_DIVIDE
divides the left operand by the right operand.public static final int AR_ARITH_OP_MODULO
AR_ARITH_OP_MODULO
finds the remainder after dividing the left operand by
the right operand.public static final int AR_ARITH_OP_NEGATE
AR_ARITH_OP_NEGATE
changes the sign of the right operand (left operand is
ignored).public ArithmeticOperationInfo()
public ArithmeticOperationInfo(int operation, ArithmeticOrRelationalOperand op1, ArithmeticOrRelationalOperand op2) throws IllegalArgumentException
IllegalArgumentException
- if invalid operationpublic ArithmeticOrRelationalOperand getLeftOperand()
public ArithmeticOrRelationalOperand getRightOperand()
public int getOperation()
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public boolean equals(Object obj)
public int hashCode()
public String toString()
public void setOperandLeft(ArithmeticOrRelationalOperand left)
public void setOperandRight(ArithmeticOrRelationalOperand right)
public void setOperation(int m_operation)
? Copyright 2013 BMC Software, Inc.