/** * Set the specified amount of units to the specified time instant. * * @param instant the milliseconds from 1970-01-01T00:00:00Z to set in * @param value value of units to set. * @return the updated time instant. * @throws IllegalArgumentException if value is too large or too small. */ public long set(long instant, int value) { FieldUtils.verifyValueBounds(this, value, getMinimumValue(), getMaximumValueForSet(instant, value)); return instant + (value - get(instant)) * iUnitMillis; }
/** * Called by the set method to get the maximum allowed value. By default, * returns getMaximumValue(instant). Override to provide a faster * implementation. */ protected int getMaximumValueForSet(long instant, int value) { return getMaximumValue(instant); }
public long remainder(long instant) { return super.remainder(instant + 3 * DateTimeConstants.MILLIS_PER_DAY); }
public long roundCeiling(long instant) { return super.roundCeiling(instant + 3 * DateTimeConstants.MILLIS_PER_DAY) - 3 * DateTimeConstants.MILLIS_PER_DAY; }
public long roundFloor(long instant) { return super.roundFloor(instant + 3 * DateTimeConstants.MILLIS_PER_DAY) - 3 * DateTimeConstants.MILLIS_PER_DAY; }
public long roundCeiling(long instant) { return super.roundCeiling(instant + 3 * DateTimeConstants.MILLIS_PER_DAY) - 3 * DateTimeConstants.MILLIS_PER_DAY; }
public long roundFloor(long instant) { return super.roundFloor(instant + 3 * DateTimeConstants.MILLIS_PER_DAY) - 3 * DateTimeConstants.MILLIS_PER_DAY; }
/** * Set the specified amount of units to the specified time instant. * * @param instant the milliseconds from 1970-01-01T00:00:00Z to set in * @param value value of units to set. * @return the updated time instant. * @throws IllegalArgumentException if value is too large or too small. */ public long set(long instant, int value) { FieldUtils.verifyValueBounds(this, value, getMinimumValue(), getMaximumValueForSet(instant, value)); return instant + (value - get(instant)) * iUnitMillis; }
/** * Called by the set method to get the maximum allowed value. By default, * returns getMaximumValue(instant). Override to provide a faster * implementation. */ protected int getMaximumValueForSet(long instant, int value) { return getMaximumValue(instant); }
public long roundCeiling(long instant) { return super.roundCeiling(instant + 3 * DateTimeConstants.MILLIS_PER_DAY) - 3 * DateTimeConstants.MILLIS_PER_DAY; }
public long roundFloor(long instant) { return super.roundFloor(instant + 3 * DateTimeConstants.MILLIS_PER_DAY) - 3 * DateTimeConstants.MILLIS_PER_DAY; }
public long remainder(long instant) { return super.remainder(instant + 3 * DateTimeConstants.MILLIS_PER_DAY); }
/** * Set the specified amount of units to the specified time instant. * * @param instant the milliseconds from 1970-01-01T00:00:00Z to set in * @param value value of units to set. * @return the updated time instant. * @throws IllegalArgumentException if value is too large or too small. */ public long set(long instant, int value) { FieldUtils.verifyValueBounds(this, value, getMinimumValue(), getMaximumValueForSet(instant, value)); return instant + (value - get(instant)) * iUnitMillis; }
/** * Called by the set method to get the maximum allowed value. By default, * returns getMaximumValue(instant). Override to provide a faster * implementation. */ protected int getMaximumValueForSet(long instant, int value) { return getMaximumValue(instant); }
public long roundCeiling(long instant) { return super.roundCeiling(instant + 3 * DateTimeConstants.MILLIS_PER_DAY) - 3 * DateTimeConstants.MILLIS_PER_DAY; }
public long roundFloor(long instant) { return super.roundFloor(instant + 3 * DateTimeConstants.MILLIS_PER_DAY) - 3 * DateTimeConstants.MILLIS_PER_DAY; }
public long remainder(long instant) { return super.remainder(instant + 3 * DateTimeConstants.MILLIS_PER_DAY); }
/** * Set the specified amount of units to the specified time instant. * * @param instant the milliseconds from 1970-01-01T00:00:00Z to set in * @param value value of units to set. * @return the updated time instant. * @throws IllegalArgumentException if value is too large or too small. */ public long set(long instant, int value) { FieldUtils.verifyValueBounds(this, value, getMinimumValue(), getMaximumValueForSet(instant, value)); return instant + (value - get(instant)) * iUnitMillis; }
/** * Called by the set method to get the maximum allowed value. By default, * returns getMaximumValue(instant). Override to provide a faster * implementation. */ protected int getMaximumValueForSet(long instant, int value) { return getMaximumValue(instant); }
public long roundCeiling(long instant) { return super.roundCeiling(instant + 3 * DateTimeConstants.MILLIS_PER_DAY) - 3 * DateTimeConstants.MILLIS_PER_DAY; }