fr.expression4j.basic.impl
Class ComplexImpl

java.lang.Object
  extended by fr.expression4j.basic.impl.RealImpl
      extended by fr.expression4j.basic.impl.ComplexImpl
All Implemented Interfaces:
MathematicalElement

public class ComplexImpl
extends RealImpl


Field Summary
 
Fields inherited from class fr.expression4j.basic.impl.RealImpl
properties, realValue
 
Fields inherited from interface fr.expression4j.basic.MathematicalElement
COMPLEX_VALUE, REAL_VALUE
 
Constructor Summary
ComplexImpl(double realValue, double complexValue)
           
 
Method Summary
 double getComplexValue()
          get the complex value of the number
 int getType()
          Return the unique identifier of an element type (1 for real, 2 for complex ...).
 void setProperties(java.util.Properties properties)
          Set properties for initialisation (when stored in xml property file)
 java.lang.String toString()
           
 
Methods inherited from class fr.expression4j.basic.impl.RealImpl
getProperties, getRealValue, getValue, setRealValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComplexImpl

public ComplexImpl(double realValue,
                   double complexValue)
Method Detail

getComplexValue

public double getComplexValue()
                       throws MathematicalException
Description copied from interface: MathematicalElement
get the complex value of the number

Specified by:
getComplexValue in interface MathematicalElement
Overrides:
getComplexValue in class RealImpl
Returns:
the complex value of the number
Throws:
MathematicalException

toString

public java.lang.String toString()
Overrides:
toString in class RealImpl

getType

public int getType()
Description copied from interface: MathematicalElement
Return the unique identifier of an element type (1 for real, 2 for complex ...).

Specified by:
getType in interface MathematicalElement
Overrides:
getType in class RealImpl
Returns:
the unique identifier of a MathematicalElement type.

setProperties

public void setProperties(java.util.Properties properties)
Description copied from interface: MathematicalElement
Set properties for initialisation (when stored in xml property file)

Specified by:
setProperties in interface MathematicalElement
Overrides:
setProperties in class RealImpl
Parameters:
properties - properties to set