|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.rubecula.jep.PresentableNumberFactory
This class implements JEP's NumberFactory interface to allow the creation of JQuantity BaseNumbers when parsing expressions using JEP.
Note that this class does reference any jquantity classes at compile-time. Instead the references are dynamic.
// TODO implement createNumber(String) and also in createNumber(double) we need to be a bit smarter and use String when it's equivalent.
| Field Summary | |
private PresentableFactoryInterface |
_PresentableFactory
An implementation of PresentableFactoryInterface, in particular: PresentableFactory.
|
| Constructor Summary | |
PresentableNumberFactory()
Constructor of a factory for creating jquantity objects for the purposes of the JEP expression parser. |
|
| Method Summary | |
java.lang.Object |
createNumber(double number)
Method to implement the NumberFactory interface of the org.nfunk.jep package. |
protected java.lang.Object |
createNumber(double number,
double bound)
Method to create a Number with a given value and error bound. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private PresentableFactoryInterface _PresentableFactory
PresentableFactory.
Used by the createNumber(double, double) method.
| Constructor Detail |
public PresentableNumberFactory()
| Method Detail |
public java.lang.Object createNumber(double number)
createNumber(double,double) with an error bound of 0.
createNumber in interface org.nfunk.jep.type.NumberFactorynumber - a number to be converted to an object.
protected java.lang.Object createNumber(double number,
double bound)
number - a number to be converted to an object.bound - - the relative error bound of the number.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||