fr.expression4j.basic.impl
Class RealImpl

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

public class RealImpl
extends java.lang.Object
implements MathematicalElement


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

Field Detail

realValue

protected double realValue

properties

protected java.util.Properties properties
Constructor Detail

RealImpl

public RealImpl(double value)
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
Returns:
the complex value of the number
Throws:
MathematicalException

getRealValue

public double getRealValue()
Description copied from interface: MathematicalElement
get the real value of the number

Specified by:
getRealValue in interface MathematicalElement
Returns:
the real value of the number

toString

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

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
Returns:
the unique identifier of a MathematicalElement type.

setRealValue

public void setRealValue(double value)

getProperties

public java.util.Properties getProperties()
Description copied from interface: MathematicalElement
Get ptoperties used to initialize element (to store it in xml property file).

Specified by:
getProperties in interface MathematicalElement
Returns:
element properties.

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
Parameters:
properties - properties to set

getValue

public java.lang.Object getValue()
Description copied from interface: MathematicalElement
get generic value of mathematical element. Used to get value of custom element define by user.

Specified by:
getValue in interface MathematicalElement
Returns:
the value of the custom element.