|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines various arithmetical mutating methods.
Method Summary | |
void |
add(BaseNumber addend)
MUTATING Instance method to add another Arithmetical into this object. |
void |
forcePositive()
MUTATING Instance method to force the value to be positive, i.e. |
void |
multiply(BaseNumber multiplicand)
MUTATING Instance method to multiply another Arithmetical into this object. |
void |
negate()
MUTATING Instance method to negate this. |
void |
raiseToPower(int power)
MUTATING Instance method to raise this to power x. |
void |
scale(long factor)
MUTATING Instance method to multiply this by a scale factor. |
Methods inherited from interface com.rubecula.jquantity.Mutable |
isMutable, setConstant |
Method Detail |
public void add(BaseNumber addend) throws InvalidOperandException
addend
- the number to add to this.
InvalidOperandException
- operands are not compatible for the add
operation.public void forcePositive()
public void multiply(BaseNumber multiplicand) throws InvalidOperandException
multiplicand
- the number by which this is to be multiplied.
InvalidOperandException
- operands are not compatible for the multiply
operation.public void negate()
public void raiseToPower(int power)
power
- the number of times this should be multiplied by itself.public void scale(long factor)
factor
- the scale factor.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |