AR System Java API

com.bmc.arsys.api
Class ArithmeticOperationInfo

java.lang.Object
  extended by com.bmc.arsys.api.ArithmeticOperationInfo
All Implemented Interfaces:
Serializable, Cloneable

public class ArithmeticOperationInfo
extends Object
implements Cloneable, Serializable

The 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

See Also:
Serialized Form

Field Summary
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 Summary
ArithmeticOperationInfo()
           
ArithmeticOperationInfo(int operation, ArithmeticOrRelationalOperand op1, ArithmeticOrRelationalOperand op2)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

AR_ARITH_OP_ADD

public static final int AR_ARITH_OP_ADD
AR_ARITH_OP_ADD adds the left and right operands.

See Also:
Constant Field Values

AR_ARITH_OP_SUBTRACT

public static final int AR_ARITH_OP_SUBTRACT
AR_ARITH_OP_SUBTRACT subtracts the right operand from the left operand.

See Also:
Constant Field Values

AR_ARITH_OP_MULTIPLY

public static final int AR_ARITH_OP_MULTIPLY
AR_ARITH_OP_MULTIPLY multiplies the left and right operands.

See Also:
Constant Field Values

AR_ARITH_OP_DIVIDE

public static final int AR_ARITH_OP_DIVIDE
AR_ARITH_OP_DIVIDE divides the left operand by the right operand.

See Also:
Constant Field Values

AR_ARITH_OP_MODULO

public static final int AR_ARITH_OP_MODULO
AR_ARITH_OP_MODULO finds the remainder after dividing the left operand by the right operand.

See Also:
Constant Field Values

AR_ARITH_OP_NEGATE

public static final int AR_ARITH_OP_NEGATE
AR_ARITH_OP_NEGATE changes the sign of the right operand (left operand is ignored).

See Also:
Constant Field Values
Constructor Detail

ArithmeticOperationInfo

public ArithmeticOperationInfo()

ArithmeticOperationInfo

public ArithmeticOperationInfo(int operation,
                               ArithmeticOrRelationalOperand op1,
                               ArithmeticOrRelationalOperand op2)
                        throws IllegalArgumentException
Throws:
IllegalArgumentException - if invalid operation
Method Detail

getLeftOperand

public ArithmeticOrRelationalOperand getLeftOperand()
Returns value of left operand of operation.


getRightOperand

public ArithmeticOrRelationalOperand getRightOperand()
Returns value of right operand of operation.


getOperation

public int getOperation()
Returns arithmetic operation used in qualification.


clone

public Object clone()
             throws CloneNotSupportedException
Clone implementation that returns an Object with data cloned from self

Overrides:
clone in class Object
Throws:
CloneNotSupportedException

equals

public boolean equals(Object obj)
Use this method for checking equality between the current object and the provided one. The result is true only if the argument is not null, is of the same type and represents the same content.

Overrides:
equals in class Object
Parameters:
obj - the object that we are comparing to
Returns:
returns a boolean that tells if the two objects equal

hashCode

public int hashCode()
Returns the hash code value for this instance of the current class. This method is supported as required by the general contract of Object.hashCode, for the benefit of hash tables such as those provided by java.util.Hashtable.

Overrides:
hashCode in class Object
Returns:
returns the hash code for this instance

toString

public String toString()
Returns a string description of the object.

Overrides:
toString in class Object

setOperandLeft

public void setOperandLeft(ArithmeticOrRelationalOperand left)

setOperandRight

public void setOperandRight(ArithmeticOrRelationalOperand right)

setOperation

public void setOperation(int m_operation)

AR System Java API

© Copyright 2006, 2007 BMC Software, Inc.