/** * Add the specified amount of offset units to the specified time * instant. The amount added may be negative. * * @param instant the time instant in millis to update. * @param amount the amount of units to add (can be negative). * @return the updated time instant. */ public long add(long instant, long amount) { instant = super.add(instant, amount); FieldUtils.verifyValueBounds(this, get(instant), iMin, iMax); return instant; }
/** * Get the amount of offset units from the specified time instant. * * @param instant the time instant in millis to query. * @return the amount of units extracted from the input. */ public int get(long instant) { return super.get(instant) + iOffset; }
/** * Set the specified amount of offset units to the specified time instant. * * @param instant the time instant in millis to update. * @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, iMin, iMax); return super.set(instant, value - iOffset); }
@Override public DurationField getRangeDurationField() { if (iRangeDurationField != null) { return iRangeDurationField; } return super.getRangeDurationField(); }
@Override public DurationField getRangeDurationField() { if (iRangeDurationField != null) { return iRangeDurationField; } return super.getRangeDurationField(); }
/** * Set the specified amount of offset units to the specified time instant. * * @param instant the time instant in millis to update. * @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, iMin, iMax); return super.set(instant, value - iOffset); }
/** * Add the specified amount of offset units to the specified time * instant. The amount added may be negative. * * @param instant the time instant in millis to update. * @param amount the amount of units to add (can be negative). * @return the updated time instant. */ public long add(long instant, int amount) { instant = super.add(instant, amount); FieldUtils.verifyValueBounds(this, get(instant), iMin, iMax); return instant; }
/** * Get the amount of offset units from the specified time instant. * * @param instant the time instant in millis to query. * @return the amount of units extracted from the input. */ public int get(long instant) { return super.get(instant) + iOffset; }
@Override public DurationField getRangeDurationField() { if (iRangeDurationField != null) { return iRangeDurationField; } return super.getRangeDurationField(); }
/** * Set the year component of the specified time instant. * * @param instant the time instant in millis to update. * @param year the year (0,292278994) to update the time to. * @return the updated time instant. * @throws IllegalArgumentException if year is invalid. */ public long set(long instant, int year) { FieldUtils.verifyValueBounds(this, year, 1, getMaximumValue()); if (iChronology.getYear(instant) <= 0) { year = 1 - year; } return super.set(instant, year); }
/** * Add the specified amount of offset units to the specified time * instant. The amount added may be negative. * * @param instant the time instant in millis to update. * @param amount the amount of units to add (can be negative). * @return the updated time instant. */ public long add(long instant, int amount) { instant = super.add(instant, amount); FieldUtils.verifyValueBounds(this, get(instant), iMin, iMax); return instant; }
/** * Get the amount of offset units from the specified time instant. * * @param instant the time instant in millis to query. * @return the amount of units extracted from the input. */ public int get(long instant) { return super.get(instant) + iOffset; }
@Override public DurationField getRangeDurationField() { if (iRangeDurationField != null) { return iRangeDurationField; } return super.getRangeDurationField(); }
/** * Set the year component of the specified time instant. * * @param instant the time instant in millis to update. * @param year the year (0,292278994) to update the time to. * @return the updated time instant. * @throws IllegalArgumentException if year is invalid. */ public long set(long instant, int year) { FieldUtils.verifyValueBounds(this, year, 1, getMaximumValue()); if (iChronology.getYear(instant) <= 0) { year = 1 - year; } return super.set(instant, year); }
/** * Add the specified amount of offset units to the specified time * instant. The amount added may be negative. * * @param instant the time instant in millis to update. * @param amount the amount of units to add (can be negative). * @return the updated time instant. */ public long add(long instant, long amount) { instant = super.add(instant, amount); FieldUtils.verifyValueBounds(this, get(instant), iMin, iMax); return instant; }
/** * Get the amount of offset units from the specified time instant. * * @param instant the time instant in millis to query. * @return the amount of units extracted from the input. */ public int get(long instant) { return super.get(instant) + iOffset; }
public long set(long instant, int year) { FieldUtils.verifyValueBounds(this, year, 0, getMaximumValue()); if (getWrappedField().get(instant) < 0) { year = -year; } return super.set(instant, year); }
/** * Add the specified amount of offset units to the specified time * instant. The amount added may be negative. * * @param instant the time instant in millis to update. * @param amount the amount of units to add (can be negative). * @return the updated time instant. */ public long add(long instant, int amount) { instant = super.add(instant, amount); FieldUtils.verifyValueBounds(this, get(instant), iMin, iMax); return instant; }
/** * Get the amount of offset units from the specified time instant. * * @param instant the time instant in millis to query. * @return the amount of units extracted from the input. */ public int get(long instant) { return super.get(instant) + iOffset; }
public long set(long instant, int year) { FieldUtils.verifyValueBounds(this, year, 0, getMaximumValue()); if (getWrappedField().get(instant) < 0) { year = -year; } return super.set(instant, year); }