public double getMaxValueForEntity_AtTime(T ent, double t) { TimeValue val = this.get(ent); if (val == null) return defaultValue.getMaxValueFor(t); return val.getMaxValueFor(t); }
public double getCurrentValueForEntity(T ent) { TimeValue val = this.get(ent); if (val == null) return defaultValue.getCurrentValue(); return val.getCurrentValue(); }
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); }
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; }
public void initialize() { for (TimeValue each : this.values()) { each.initialize(); } defaultValue.initialize(); }