Examples of DoubleData


Examples of net.sourceforge.processdash.data.DoubleData

  }

  public void setString(String s) throws MalformedValueException {
    try {
      Number n = FMT.parse(s);
      value = new DoubleData(n.doubleValue());
    } catch (Exception pe) {
      throw new MalformedValueException();
    }
  }
View Full Code Here

Examples of net.sourceforge.processdash.data.DoubleData

  }

 
  public void setString(String s) throws MalformedValueException {
    try {
      value = new DoubleData(FormatUtil.parsePercent(s.trim()), true);
    } catch (Exception e) {
      throw new MalformedValueException();
    }
  }
View Full Code Here

Examples of net.sourceforge.processdash.data.DoubleData

     * numRows() or numCols(), respectively. */
    public SimpleData getData(int row, int col) {
        if (row == 0 || col == 0) throw new ArrayIndexOutOfBoundsException();
        Object o = data[row][col];
        if (o instanceof NumberData && ((NumberData)o).isDefined())
            return new DoubleData
                (((NumberData) o).getDouble() *
                 multiplier[useRowFormats ? row : col], false);
        else
            return (o instanceof SimpleData) ? (SimpleData) o : null;
    }
View Full Code Here

Examples of net.sourceforge.processdash.data.DoubleData

        // Save the LPI and UPI
        if (range instanceof DoubleData) {
            double est   = ((DoubleData) estimate).getDouble();
            double rng = ((DoubleData) range).getDouble();
            upi = new DoubleData(est + rng);
            lpi = new DoubleData(Math.max(0, est - rng));
        } else
            upi = lpi = N_A;
        putValue(getDataName("LPI"), lpi);
        putValue(getDataName("UPI"), upi);
View Full Code Here

Examples of net.sourceforge.processdash.data.DoubleData

        String inputFieldValue = (String) params.get(inputFieldName);
        SimpleData result = N_A;
        try {
            double value = Double.parseDouble(inputFieldValue);
            if (!Double.isInfinite(value) && !Double.isNaN(value))
              result = new DoubleData(value * mult);
        } catch (NumberFormatException nfe) { }
        return result;
    }
View Full Code Here

Examples of net.sourceforge.processdash.data.DoubleData

            switch (value.charAt(0)) {
            case '0': case '1': case '2': case '3': case '4':
            case '5': case '6': case '7': case '8': case '9':
            case '-': case '+': case '.': case ',':
                try {
                    result = new DoubleData(value);
                    result.setEditable(false);
                    return result;
                } catch (MalformedValueException mfe) {
                }
            }
View Full Code Here

Examples of net.sourceforge.processdash.data.DoubleData

    private void validateAndStoreData(SizeMetricApiRequestData request,
            String dataPrefix) {
        // parse and validate the supplied parameter values
        StringData description = getDescription(request);
        StringData sizeUnits = getSizeUnits(request);
        DoubleData actSize = getActualSize(request);

        // store them into the data repository
        putData(request, dataPrefix + "/" + DESCRIPTION_ELEM, description);
        putData(request, dataPrefix + "/" + UNITS_ELEM, sizeUnits);
        putData(request, dataPrefix + "/" + ACT_SIZE_ELEM, actSize);
View Full Code Here

Examples of net.sourceforge.processdash.data.DoubleData

            throw badRequest(MISSING_PARAM, "No value was provided for the ",
                "required parameter 'actSize'").putAttr("param", "actSize");

        try {
            double result = Double.parseDouble(paramVal.trim());
            return new DoubleData(result);
        } catch (NumberFormatException nfe) {
            throw badRequest(BAD_PARAM, "The 'actSize' parameter value '",
                paramVal, "' is not a valid number")
                    .putAttr("param", "actSize");
        }
View Full Code Here

Examples of net.sourceforge.processdash.data.DoubleData

        result.setColName(0, "");
        result.setColName(1, "Total # Items");

        for (int i = 0; i < len; i++) {
            result.setRowName(i + 1, SIZE_NAMES.get(i));
            result.setData(i + 1, 1, new DoubleData(histogram[i]));
        }
        this.data = result;
    }
View Full Code Here

Examples of net.sourceforge.processdash.data.DoubleData

        long pathTime = (pathValue)[0];
        if (currentVal instanceof NumberData
                && ((NumberData) currentVal).getDouble() == pathTime)
            return;

        data.putValue(dataName, new DoubleData(pathTime, false));
    }
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.