| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
T - The type of the operands and returned values from operations
            on objects that implement this interface.public interface ArithmeticObject<T>
This interface specifies the major arithmetic operations for objects implementing this interface. The operands and returned values are of type T, where T is the type parameter for this interface.
| Method Summary | |
|---|---|
|  T | abs()Returns a type T object whose value is the absolute value of this ArithmeticObject. | 
|  T | add(T other)Returns a type T object whose value is (this + other), that is, the result of adding the given type T object to this ArithmeticObject. | 
|  T | divide(T other)Returns a type T object whose value is (this / other), that is, the result of dividing this ArithmeticObject by the given type T object. | 
|  T | multiply(T other)Returns a type T object whose value is (this * other), that is, the result of multiplying this ArithmeticObject by the given type T object. | 
|  T | negate()Returns a type T object whose value is (- this), that is, has the same absolute value but opposite sign of this ArithmeticObject. | 
|  T | subtract(T other)Returns a type T object whose value is (this - other), that is, the result of subtracting the given type T object from this ArithmeticObject. | 
| Method Detail | 
|---|
T abs()
T negate()
T add(T other)
other - The type T object to add to this ArithmeticObject.
T subtract(T other)
other - The type T object to subtract from this ArithmeticObject.
T multiply(T other)
other - The type T object by which this ArithmeticObject is to be multiplied.
T divide(T other) throws java.lang.ArithmeticException
other - The type T object by which this ArithmeticObject is to be divided.
java.lang.ArithmeticException - If the given divisor has zero as its value.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||