Document method.

It's important to warn that it can overflow.

FEA: ItEr60S19TimeUnitDataType
This commit is contained in:
Óscar González Fernández 2010-08-30 14:10:31 +02:00
parent 8334cc2b2e
commit e887942893

View file

@ -129,8 +129,15 @@ public class EffortDuration implements Comparable<EffortDuration> {
return seconds - other.seconds;
}
public EffortDuration multiplyBy(int integer) {
return EffortDuration.seconds(this.seconds * integer);
/**
* Multiplies this duration by a scalar <br />
* <b>Warning:<b /> This method can cause an integer overflow and the result
* would be incorrect.
* @param n
* @return a duration that is the multiply of n and <code>this</code>
*/
public EffortDuration multiplyBy(int n) {
return EffortDuration.seconds(this.seconds * n);
}
/**