Examples of NumericData


Examples of net.helipilot50.stocktrade.framework.NumericData

  public Object stringToValue(String text) throws ParseException
    {
      // TF:9/3/08:This class is only used to format numeric data objects, so we know from it's
      // construction that the value class must be a subclass of data value
      Class<? extends DataValue> formatClass = (Class<? extends DataValue>)getValueClass();
        NumericData numericData = (NumericData) FormatterUtils.createDataValueInstance(formatClass);
        if (!FormatterUtils.isNullable(numericData, text))
        {
            // Check if the value is null, then map to 0.  This is what Forte did.  CraigM: 19/02/2008.
            if (text == null || text.length() == 0) {
                setNumericData(numericData, 0);
            }
            else {
                Number number = (Number) getFormat().parseObject(text);
                setNumericData(numericData, number);
            }
        }
        else
        {
            numericData.setIsNull(true);
        }
        return numericData;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.