com.rubecula.jquantity
Class DivisibleMutable
java.lang.Object
com.rubecula.util.Item
com.rubecula.jquantity.BaseNumber
com.rubecula.jquantity.MutableNumber
com.rubecula.jquantity.DivisibleMutable
- All Implemented Interfaces:
- Arithmetical, Arithmutable, Auditable, java.lang.Cloneable, java.lang.Comparable, Divisible, Fuzzy, Identifiable, Millable, Mutable, Nameable, Presentable, java.io.Serializable
- Direct Known Subclasses:
- Rational
- public abstract class DivisibleMutable
- extends MutableNumber
- implements Divisible
Interface to define Mutating Divisible arithmetical operations.
Essentially these are operations which can transform an integer (or any
number) into a non-integer.
- Since:
- V_0_2
- Version:
- $Revision: 1.3 $
- Author:
- Robin Hillyard
- See Also:
- Serialized Form
Fields inherited from class com.rubecula.jquantity.BaseNumber |
|
Method Summary |
abstract void |
divide(BaseNumber divisor)
MUTATING method to replace this with quotient of this
over divisor. |
abstract void |
invert()
MUTATING Instance method to invert this object arithmetically
(i.e. replace this by its reciprocal). |
abstract void |
scale(double factor)
MUTATING Instance method to multiply this by a scale factor.
|
Methods inherited from class com.rubecula.jquantity.MutableNumber |
assertMutable, clone, defaultIdentifier, factor, factored, forcePositive, getIdentifier, getIdentifier, isLong, isMutable, product, setConstant, setIdentifier, setIdentifierPost, setIdentifierPre, setIdentifierPrePost, sum, test, toIntegral |
Methods inherited from class com.rubecula.jquantity.BaseNumber |
abs, bestModel, BestModel, byteValue, characteristic, Characteristic, difference, doubleValue, floatValue, getBound, getBoundAbs, getModel, impartFuzziness, intValue, isEqual, isExact, isUncertain, isZero, longValue, minus, pow, scaled, shortValue, valueOf, valueOf, valueOfLog10 |
Methods inherited from class com.rubecula.util.Item |
audit, audit, compareTo, Debug, getClassNameShort, getType, IsDebug, present, SetDebug, test, test, toString, Wrap |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DivisibleMutable
public DivisibleMutable()
scale
public abstract void scale(double factor)
- MUTATING Instance method to multiply this by a scale factor.
Note that under this operation, the scaling (multiplication) is always
directly on the value in this regardless of type.
So for example, if this is an instance of Value of type Log,
then the effect of a scale by rwo will be to square the effective value.
- Parameters:
factor
- the scale factor.
invert
public abstract void invert()
- MUTATING Instance method to invert this object arithmetically
(i.e. replace this by its reciprocal).
divide
public abstract void divide(BaseNumber divisor)
throws InvalidOperandException
- MUTATING method to replace this with quotient of this
over divisor.
- Parameters:
divisor
- the value to be divided into this.
- Throws:
InvalidOperandException