private boolean eventuallyUseLoadWork() { if (data.containsKey(ItemCaract.LOAD) && data.containsKey(ItemCaract.WORK) && data.containsKey(ItemCaract.DURATION) == false) { final Load l = (Load) data.get(ItemCaract.LOAD); final NumericNumber w = (NumericNumber) data.get(ItemCaract.WORK); data.put(ItemCaract.DURATION, new Duration(l.getMinuteMen() / w.getIntValue())); return true; } return false; }
private boolean eventuallyUseDurationWork() { if (data.containsKey(ItemCaract.DURATION) && data.containsKey(ItemCaract.WORK) && data.containsKey(ItemCaract.LOAD) == false) { final Duration d = (Duration) data.get(ItemCaract.DURATION); final NumericNumber w = (NumericNumber) data.get(ItemCaract.WORK); data.put(ItemCaract.LOAD, new Load(d.getMinutes() * w.getIntValue())); return true; } return false; }
public Load(NumericNumber value) { this(value.getIntValue() * 24L * 60 * 60); }
public Duration(NumericNumber value) { this(value.getIntValue() * 24L * 60 * 60); }