private static class GJChronology.LinkedDurationField extends DecoratedDurationField
| Modifier and Type | Field and Description |
|---|---|
private GJChronology.ImpreciseCutoverField |
iField |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
LinkedDurationField(DurationField durationField,
GJChronology.ImpreciseCutoverField dateTimeField) |
| Modifier and Type | Method and Description |
|---|---|
long |
add(long instant,
int value)
Adds a duration value (which may be negative) to the instant.
|
long |
add(long instant,
long value)
Adds a duration value (which may be negative) to the instant.
|
int |
getDifference(long minuendInstant,
long subtrahendInstant)
Computes the difference between two instants, as measured in the units
of this field.
|
long |
getDifferenceAsLong(long minuendInstant,
long subtrahendInstant)
Computes the difference between two instants, as measured in the units
of this field.
|
getMillis, getMillis, getUnitMillis, getValueAsLong, getWrappedField, isPrecisecompareTo, getMillis, getMillis, getName, getType, getValue, getValue, getValueAsLong, isSupported, toStringsubtract, subtractprivate static final long serialVersionUID
private final GJChronology.ImpreciseCutoverField iField
LinkedDurationField(DurationField durationField, GJChronology.ImpreciseCutoverField dateTimeField)
public long add(long instant,
int value)
DurationFieldadd in class DecoratedDurationFieldinstant - the milliseconds from 1970-01-01T00:00:00Z to add tovalue - the value to add, in the units of the fieldpublic long add(long instant,
long value)
DurationFieldadd in class DecoratedDurationFieldinstant - the milliseconds from 1970-01-01T00:00:00Z to add tovalue - the value to add, in the units of the fieldpublic int getDifference(long minuendInstant,
long subtrahendInstant)
DurationFieldlong instant = ... int v = ... int age = getDifference(add(instant, v), instant);The value 'age' is the same as the value 'v'.
getDifference in class BaseDurationFieldminuendInstant - the milliseconds from 1970-01-01T00:00:00Z to
subtract fromsubtrahendInstant - the milliseconds from 1970-01-01T00:00:00Z to
subtract off the minuendpublic long getDifferenceAsLong(long minuendInstant,
long subtrahendInstant)
DurationFieldlong instant = ... long v = ... long age = getDifferenceAsLong(add(instant, v), instant);The value 'age' is the same as the value 'v'.
getDifferenceAsLong in class DecoratedDurationFieldminuendInstant - the milliseconds from 1970-01-01T00:00:00Z to
subtract fromsubtrahendInstant - the milliseconds from 1970-01-01T00:00:00Z to
subtract off the minuend