Examples of DoubleData


Examples of pspdash.data.DoubleData

          if (pt != null)
            l += (long)((DoubleData) pt).getInteger ();

          // Save the new value into the data repository.
          data.putValue(thePath, new DoubleData(l, false));
        }
      }
    }
    postedChanges.clear ();
  }
View Full Code Here

Examples of pspdash.data.DoubleData

    return results;
  }

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

Examples of pspdash.data.DoubleData

    }

    Iterator dataNames = data.getKeys();
    String name, subname;
    int prefixLength = dataPrefix.length();
    DoubleData val;

    while (dataNames.hasNext()) {
      name = (String) dataNames.next();
      if (name.startsWith(dataPrefix)) {
        subname = name.substring(prefixLength);
        if (subname.endsWith(DEF_INJ_SUFFIX) ||
            subname.endsWith(DEF_REM_SUFFIX)) {

          Object o = data.getValue(name);
          if (!(o instanceof DoubleData) || o instanceof NumberFunction)
                      // Don't overwrite calculations, which are
            continue; // typically summing up values from other places

          val = new DoubleData(phaseData.extractValue(subname));
          val.setEditable(false);
          data.putValue(name, val);
        }
      }
    }

    dataNames = phaseData.keySet().iterator();
    while (dataNames.hasNext()) {
      subname = (String) dataNames.next();
      name = data.createDataName(dataPrefix, subname);
      val = new DoubleData(phaseData.extractValue(subname));
      val.setEditable(false);
      data.putValue(name, val);
    }
  }
View Full Code Here

Examples of pspdash.data.DoubleData

        } else if (p > 0 && p < 1) {
            planLevelOfEffort = p;
            // save this level of effort to the data repository
            data.userPutValue
                (data.createDataName(fullName, getLevelOfEffortDataname()),
                 new DoubleData(planLevelOfEffort, true));
        }
    }
View Full Code Here

Examples of pspdash.data.DoubleData

        if (newTaskListName != null && newValue != defaultValue) {
            String newDataName = dataNamePrefix + newTaskListName;
            if (newDataName.equals(oldDataName)) oldDataName = null;
            if (newValue != savedValue || oldDataName != null) {
                SimpleData d = new DoubleData(newValue, false);
                String dataName = data.createDataName(fullName, newDataName);
                data.putValue(dataName, d);
            }
        }
View Full Code Here

Examples of pspdash.data.DoubleData

                this.planTime = topDownPlanTime = bottomUpPlanTime = planTime;
                planTimeNull = planTimeUndefined = false;
                // save those minutes to the data repository
                data.userPutValue(data.createDataName(fullName,
                                                      PLAN_TIME_DATA_NAME),
                                  new DoubleData(planTime, true));
                userSetLevelOfEffort(null);
            } else {
                this.planTime = topDownPlanTime = bottomUpPlanTime;
                data.userPutValue(data.createDataName(fullName,
                                                      PLAN_TIME_DATA_NAME),
View Full Code Here

Examples of pspdash.data.DoubleData

                result += val;
        }
        if (alias != null && alias != NO_ALIAS_YET && sVal != null)
            return new DescribedValue(sVal, context.resolveName(alias));
        else
            return new DoubleData(result);
    }
View Full Code Here

Examples of pspdash.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 pspdash.data.DoubleData

    value = (b.booleanValue() ? trueValue : falseValue);
  }


  public void setString(String s) throws Exception {
    value = new DoubleData(s);
  }
View Full Code Here

Examples of pspdash.data.DoubleData

  }

  public void setString(String s) throws Exception {
    // remove final "%" if it is present, then parse as usual.
    if (s != null) s = s.replace('%', ' ').trim();
    DoubleData d = new DoubleData(s);
    d = new DoubleData(d.getDouble() / 100.0);
    value = d;
  }
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.