This class is immutable and all arithmetic operations do not alter the object but instead return a new object with the result to allow chaining of operations. If this presents too large a performance impact it could be changed, however all of Java's numeric classes are immutable so this was done out of conformance.
This class inherits from {@link Number} although it does not strictly for thepurpose of it. {@link Number} essentially seems to be a class intended for avery small subset of numbers which does not include complex or hypercomplex numbers. Thus the methods {@link #doubleValue()}, {@link #floatValue()}, {@link #intValue()}, {@link #byteValue()}, {@link #shortValue()} and{@link #longValue()} are defined and implemented but only return the possiblytruncated or rounded real part of the complex number. This is only of limited value but done to allow subclassing {@link Number} as an indication that thisclass represents numbers. @author Johannes Rössel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|