/** * Delegates to the duration field. * * @throws UnsupportedOperationException if the duration is unsupported */ public long add(long instant, long value) { return getDurationField().add(instant, value); }
/** * Delegates to the duration field. * * @throws UnsupportedOperationException if the duration is unsupported */ public long add(long instant, int value) { return getDurationField().add(instant, value); }
public long add(long instant, int value) { long scaled = ((long) value) * ((long) iScalar); return getWrappedField().add(instant, scaled); }
/** * Adds a value (which may be negative) to the instant value, * overflowing into larger fields if necessary. * * @param instant the milliseconds from 1970-01-01T00:00:00Z to add to * @param value the long value to add, in the units of the field * @return the updated milliseconds * @throws IllegalArgumentException if value is too large * @see #add(long,int) */ public long add(long instant, long value) { return getDurationField().add(instant, value); }
/** * Delegates to the duration field. * * @throws UnsupportedOperationException if the duration is unsupported */ public long add(long instant, long value) { return getDurationField().add(instant, value); }
public long add(long instant, int value) { int offset = getOffsetToAdd(instant); instant = iField.add(instant + offset, value); return instant - (iTimeField ? offset : getOffsetFromLocalToSubtract(instant)); }
public long add(long instant, long value) { int offset = getOffsetToAdd(instant); instant = iField.add(instant + offset, value); return instant - (iTimeField ? offset : getOffsetFromLocalToSubtract(instant)); }
public long add(long instant, long value) { long scaled = FieldUtils.safeMultiply(value, iScalar); return getWrappedField().add(instant, scaled); }
public long add(long instant, int amount) { checkLimits(instant, null); long result = getWrappedField().add(instant, amount); checkLimits(result, "resulting"); return result; }
public long add(long instant, long amount) { checkLimits(instant, null); long result = getWrappedField().add(instant, amount); checkLimits(result, "resulting"); return result; }
/** * Add a number of years to the date. * * @param years the years to add * @throws IllegalArgumentException if the value is invalid */ public void addYears(final int years) { if (years != 0) { setMillis(getChronology().years().add(getMillis(), years)); } }
/** * Add a number of weeks to the date. * * @param weeks the weeks to add * @throws IllegalArgumentException if the value is invalid */ public void addWeeks(final int weeks) { if (weeks != 0) { setMillis(getChronology().weeks().add(getMillis(), weeks)); } }
/** * Add a number of minutes to the date. * * @param minutes the minutes to add * @throws IllegalArgumentException if the value is invalid */ public void addMinutes(final int minutes) { if (minutes != 0) { setMillis(getChronology().minutes().add(getMillis(), minutes)); } }
/** * Add a number of days to the date. * * @param days the days to add * @throws IllegalArgumentException if the value is invalid */ public void addDays(final int days) { if (days != 0) { setMillis(getChronology().days().add(getMillis(), days)); } }
/** * Add a number of hours to the date. * * @param hours the hours to add * @throws IllegalArgumentException if the value is invalid */ public void addHours(final int hours) { if (hours != 0) { setMillis(getChronology().hours().add(getMillis(), hours)); } }
/** * Add a number of months to the date. * * @param months the months to add * @throws IllegalArgumentException if the value is invalid */ public void addMonths(final int months) { if (months != 0) { setMillis(getChronology().months().add(getMillis(), months)); } }
/** * Add a number of weekyears to the date. * * @param weekyears the weekyears to add * @throws IllegalArgumentException if the value is invalid */ public void addWeekyears(final int weekyears) { if (weekyears != 0) { setMillis(getChronology().weekyears().add(getMillis(), weekyears)); } }
/** * Add a number of seconds to the date. * * @param seconds the seconds to add * @throws IllegalArgumentException if the value is invalid */ public void addSeconds(final int seconds) { if (seconds != 0) { setMillis(getChronology().seconds().add(getMillis(), seconds)); } }
/** * Add a number of milliseconds to the date. The implementation of this * method differs from the {@link #add(long)} method in that a * DateTimeField performs the addition. * * @param millis the milliseconds to add * @throws IllegalArgumentException if the value is invalid */ public void addMillis(final int millis) { if (millis != 0) { setMillis(getChronology().millis().add(getMillis(), millis)); } }
/** * Add a number of weeks to the date. * * @param weeks the weeks to add * @throws IllegalArgumentException if the value is invalid */ public void addWeeks(final int weeks) { if (weeks != 0) { setMillis(getChronology().weeks().add(getMillis(), weeks)); } }