Examples of DoubleData


Examples of net.sourceforge.processdash.data.DoubleData

  }
  private void modifyDataValue(String dataName, int increment,
          boolean ignoreExistingValue) {
    String prefix = dataPrefix + getDataNamespace();
    dataName = DataRepository.createDataName(prefix, dataName);
    DoubleData val;
    try {
      val = (DoubleData)data.getValue(dataName);
    } catch (ClassCastException cce) {
      return;          // Do nothing - don't overwrite values of other types
    }
    if (val instanceof NumberFunction) {
      return;          // Do nothing - don't overwrite old-style calculations
    } else if (ignoreExistingValue && increment == 0) {
      if (val != null && val.getDouble() != 0)
        data.restoreDefaultValue(dataName);
      return;
    } else if (val == null || ignoreExistingValue) {
      val = new DoubleData(increment);
    } else {
      val = new DoubleData(val.getInteger() + increment);
    }
    val.setEditable(false);
    data.putValue(dataName, val);
  }
View Full Code Here

Examples of net.sourceforge.processdash.data.DoubleData

        return StringData.create(s);
    }

    private DoubleData num(Object n, int fraction) {
        if (n instanceof Number) {
            return new DoubleData(((Number) n).doubleValue() / fraction);
        } else {
            return ImmutableDoubleData.READ_ONLY_ZERO;
        }
    }
View Full Code Here

Examples of net.sourceforge.processdash.data.DoubleData

    }

    private void setEstimate(String prefix, double value) {
        data.userPutValue(
            DataRepository.createDataName(prefix, ESTIMATED_TIME),
            new DoubleData(value, true));
    }
View Full Code Here

Examples of net.sourceforge.processdash.data.DoubleData

        String defectType;

        while (i.hasNext()) {
            defectType = (String) i.next();
            data.setRowName(numRows, defectType);
            data.setData(numRows, 1, new DoubleData(getRow(defectType)[0]));
            numRows--;
        }
        data.sortBy(1, true);
    }
View Full Code Here

Examples of net.sourceforge.processdash.data.DoubleData

     * @return a SimpleData value, or null if this object does not correspond to
     *         one of the supported types.
     */
    protected SimpleData toSimpleData(Object object) {
        if (object instanceof Number) {
            return new DoubleData(((Number) object).doubleValue());
        } else if (object instanceof String) {
            return StringData.create((String) object);
        } else if (object instanceof Date) {
            return new DateData((Date) object, false);
        } else {
View Full Code Here

Examples of net.sourceforge.processdash.data.DoubleData

     *
     * This method <b>must</b> be thread-safe.
     */
    public Object call(List arguments, ExpressionContext context)
    {
        return new DoubleData(collapseLists(arguments, 0).size());
    }
View Full Code Here

Examples of plotter.DoubleData

    PointData input = new PointData(d.getXData(), d.getYData());
    PointData output = new PointData();
    compressor.compress(input, output, 0, scale);
    int size = d.getPointCount();
    int size2 = output.getX().getLength();
    DoubleData x = output.getX();
    DoubleData y = output.getY();
    d2.removeAllPoints();
    for(int i = 0; i < size2; i++) {
      d2.add(x.get(i), y.get(i));
    }
    System.out.println("Input size: " + size);
    System.out.println("Output size: " + size2);
    System.out.println("Points per pixel: " + size2 / (double) compressedContents.getWidth());
    System.out.println("Compression ratio: " + 100.0 * (size - size2) / (double) size);
View Full Code Here

Examples of pspdash.data.DoubleData

    static void setPassword(DataRepository data, String prefix,
                                   String user, String password) {
        String dataName = data.createDataName(prefix,  "_Password_");

        if (user == null) {
            DoubleData val;
            if (password == null)
                val = ImmutableDoubleData.TRUE;
            else
                val = ImmutableDoubleData.FALSE;
            data.putValue(dataName, val);
View Full Code Here

Examples of pspdash.data.DoubleData

      } catch (Exception e) { validateCell = null; return false; }
      switch (col) {
      case 2:                   // Planned Time
        try {
          String thePath = te.taskName.path();
          DoubleData pt = (DoubleData)data.getSimpleValue (thePath + PLANNED_TIME);
          if ((pt == null) || (pt.isEditable())) {
            long lv = parseTime (newValue);
            if (lv >= 0) {
              te.plannedTime = lv;
            } else {
              te.plannedTime = 0;
              rv = false;
            }
            data.putValue (thePath + PLANNED_TIME,
                           new DoubleData (te.plannedTime));
          }
          taskTable.table.setValueAt (formatTime (te.plannedTime), col, row);
        } catch (Exception e) { rv = false; }
        break;
      case 7:                   // Actual Date
View Full Code Here

Examples of pspdash.data.DoubleData

            globalPrefix = MAIN_DATA_PREFIX + newName;
            ordinalPrefix = TASK_ORDINAL_PREFIX + newName;
            for (int j = r.getNumChildren();  j-- > 0) {
                dataName = data.createDataName(r.getChild(j).getFullName(),
                                               ordinalPrefix);
                data.putValue(dataName, new DoubleData(j, false));
                oldNames.remove(dataName);
            }
            // save the schedule
            dataName = data.createDataName(globalPrefix, EST_HOURS_DATA_NAME);
            data.putValue(dataName, schedule.getSaveList());
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.