コード例 #1
0
ファイル: MutableDateTime.java プロジェクト: tbaum/gwt-time
 /**
  * Adds a duration to this instant specifying how many times to add.
  *
  * <p>This will typically change the value of most fields.
  *
  * @param duration the duration to add, null means add zero
  * @param scalar direction and amount to add, which may be negative
  * @throws ArithmeticException if the result exceeds the capacity of the instant
  */
 public void add(ReadableDuration duration, int scalar) {
   if (duration != null) {
     add(FieldUtils.safeMultiply(duration.getMillis(), scalar));
   }
 }
コード例 #2
0
ファイル: MutableDateTime.java プロジェクト: tbaum/gwt-time
 /**
  * Adds a period to this instant.
  *
  * <p>This will typically change the value of most fields.
  *
  * @param period the period to add, null means add zero
  * @throws ArithmeticException if the result exceeds the capacity of the instant
  */
 public void add(ReadablePeriod period) {
   add(period, 1);
 }
コード例 #3
0
ファイル: MutableDateTime.java プロジェクト: tbaum/gwt-time
 /**
  * Adds a duration to this instant.
  *
  * <p>This will typically change the value of most fields.
  *
  * @param duration the duration to add, null means add zero
  * @throws ArithmeticException if the result exceeds the capacity of the instant
  */
 public void add(ReadableDuration duration) {
   add(duration, 1);
 }