gnu.math
Class CQuantity

java.lang.Object
  extended by java.lang.Number
      extended by gnu.math.Numeric
          extended by gnu.math.Quantity
              extended by gnu.math.CQuantity
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class CQuantity
extends Quantity
implements java.io.Externalizable

General Cartesian Complex quantity.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gnu.math.Numeric
CEILING, FLOOR, ROUND, TRUNCATE
 
Constructor Summary
CQuantity(Complex num, Unit unit)
           
CQuantity(RealNum real, RealNum imag, Unit unit)
           
 
Method Summary
 boolean isExact()
           
 boolean isZero()
           
 Complex number()
           
 void readExternal(java.io.ObjectInput in)
           
 Unit unit()
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class gnu.math.Quantity
abs, add, add, addReversed, compare, compare, compareReversed, dimensions, div, divide, divReversed, doubleImagValue, doubleValue, im, imValue, make, make, make, mul, mulReversed, neg, re, reValue, times, toString
 
Methods inherited from class gnu.math.Numeric
add, div_inv, equals, floatValue, geq, grt, intValue, longValue, mul_ident, power, sub, toString
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CQuantity

public CQuantity(Complex num,
                 Unit unit)

CQuantity

public CQuantity(RealNum real,
                 RealNum imag,
                 Unit unit)
Method Detail

number

public Complex number()
Specified by:
number in class Quantity

unit

public Unit unit()
Overrides:
unit in class Quantity

isExact

public boolean isExact()
Specified by:
isExact in class Numeric

isZero

public boolean isZero()
Specified by:
isZero in class Numeric

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException