Esempio n. 1
0
  public double getMaxValueForEntity_AtTime(T ent, double t) {

    TimeValue val = this.get(ent);
    if (val == null) return defaultValue.getMaxValueFor(t);

    return val.getMaxValueFor(t);
  }
Esempio n. 2
0
  public double getCurrentValueForEntity(T ent) {

    TimeValue val = this.get(ent);
    if (val == null) return defaultValue.getCurrentValue();

    return val.getCurrentValue();
  }
Esempio n. 3
0
  public double getFirstNonZeroExpectedValueForTime(double t) {

    // find the first non zero entry
    for (TimeValue each : this.values()) {
      if (each.getExpectedValueForTime(t) > 0) {
        return each.getExpectedValueForTime(t);
      }
    }

    return defaultValue.getExpectedValueForTime(t);
  }
Esempio n. 4
0
  public boolean hasNonZeroExpectedValueForTime(double t) {

    // find the first non zero entry
    for (TimeValue each : this.values()) {
      if (each.getExpectedValueForTime(t) > 0) {
        return true;
      }
    }

    if (defaultValue.getExpectedValueForTime(t) > 0) return true;

    return false;
  }
Esempio n. 5
0
 public void initialize() {
   for (TimeValue each : this.values()) {
     each.initialize();
   }
   defaultValue.initialize();
 }