@Unstable
public final class CalendarInterval
extends Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
int |
days |
long |
microseconds |
int |
months |
| Constructor and Description |
|---|
CalendarInterval(int months,
int days,
long microseconds) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
java.time.Duration |
extractAsDuration()
Extracts the time part of the interval.
|
java.time.Period |
extractAsPeriod()
Extracts the date part of the interval.
|
int |
hashCode() |
String |
toString() |
public final int months
public final int days
public final long microseconds
public CalendarInterval(int months,
int days,
long microseconds)
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic java.time.Period extractAsPeriod()
java.time.Period based on the months and days fields
of the given interval, not null.public java.time.Duration extractAsDuration()
java.time.Duration based on the microseconds field
of the given interval, not null.ArithmeticException - if a numeric overflow occurs