TemporalOffset on basis of TemporalUnit.
| Modifier and Type | Field and Description |
|---|---|
| protected final TemporalUnit | |
| protected final long |
| Access | Constructor and Description |
|---|---|
| public | TemporalUnitOffset(long
the value of the offset. value, TemporalUnit temporal unit of the offset. unit)Creates a new temporal offset for a given temporal unit. |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| protected Duration | Returns: absolute value of the difference as Duration.the first temporal1, Temporal Temporalthe second temporal2)TemporalReturns absolute value of the difference as Duration. |
| public String | getBeyondOffsetDifferenceDescription(Temporal
first temporal value which is being validated against second temporal value. temporal1, Temporal second temporal value. temporal2)Implements org. |
| protected long | Returns: absolute value of the difference according to time unit.the first temporal1, Temporal Temporalthe second temporal2)TemporalReturns absolute value of the difference according to time unit. |
| public TemporalUnit | |
| public int |
| unit | back to summary |
|---|---|
| protected final TemporalUnit unit | |
| value | back to summary |
|---|---|
| protected final long value | |
| TemporalUnitOffset | back to summary |
|---|---|
| public TemporalUnitOffset(long value, TemporalUnit unit) Creates a new temporal offset for a given temporal unit.
| |
| checkThatValueIsPositive | back to summary |
|---|---|
| private static void checkThatValueIsPositive(long value) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getAbsoluteDuration | back to summary |
|---|---|
| protected Duration getAbsoluteDuration(Temporal temporal1, Temporal temporal2) Returns absolute value of the difference as Duration. | |
| getBeyondOffsetDifferenceDescription | back to summary |
|---|---|
| public String getBeyondOffsetDifferenceDescription(Temporal temporal1, Temporal temporal2) Implements org. Doc from org. Returns description of the difference between temporal values and expected offset details. Is designed for the case when difference is beyond offset. | |
| getDifference | back to summary |
|---|---|
| protected long getDifference(Temporal temporal1, Temporal temporal2) Returns absolute value of the difference according to time unit. | |
| getUnit | back to summary |
|---|---|
| public TemporalUnit getUnit() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |