com.rubecula.jquantity
Class DivisibleMutable

java.lang.Object
  extended bycom.rubecula.util.Item
      extended bycom.rubecula.jquantity.BaseNumber
          extended bycom.rubecula.jquantity.MutableNumber
              extended bycom.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

Field Summary
 
Fields inherited from class com.rubecula.jquantity.MutableNumber
$__1, $0, $1, $10, $2, $3
 
Fields inherited from class com.rubecula.jquantity.BaseNumber
 
Fields inherited from class com.rubecula.util.Item
JQUANTITY_TEST
 
Fields inherited from interface com.rubecula.jquantity.Fuzzy
$DistGaussian, $DistInvalid, $DistNone, $DistUniform, $Names
 
Constructor Summary
DivisibleMutable()
           
 
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
 
Methods inherited from interface com.rubecula.jquantity.Divisible
factored, inverse, quotient
 
Methods inherited from interface com.rubecula.jquantity.Arithmutable
add, multiply, negate, raiseToPower, scale
 
Methods inherited from interface com.rubecula.jquantity.Arithmetical
isInfinite, isInteger, isUnity, signum
 
Methods inherited from interface com.rubecula.util.Auditable
audit, audit, audit
 
Methods inherited from interface com.rubecula.util.Presentable
makePresentableInstance, present
 

Constructor Detail

DivisibleMutable

public DivisibleMutable()
Method Detail

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