fr.expression4j.sample.custom.operator
Class BooleanMathematicalElement

java.lang.Object
  extended by fr.expression4j.sample.custom.operator.BooleanMathematicalElement
All Implemented Interfaces:
MathematicalElement

public class BooleanMathematicalElement
extends java.lang.Object
implements MathematicalElement

define a mathematical element who contens a boolean element.

Author:
SGINER

Field Summary
static java.lang.String BOOLEAN_VALUE
           
 
Fields inherited from interface fr.expression4j.basic.MathematicalElement
COMPLEX_VALUE, REAL_VALUE
 
Constructor Summary
BooleanMathematicalElement(boolean 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)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOLEAN_VALUE

public static final java.lang.String BOOLEAN_VALUE
See Also:
Constant Field Values
Constructor Detail

BooleanMathematicalElement

public BooleanMathematicalElement(boolean 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

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.

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

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.

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.

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