Constructor and Description |
---|
Interval(int years,
int months,
int days,
int hours,
int minutes,
int seconds,
int microseconds)
Creates an interval value from a number of years, months, days, hours, minutes, seconds, and microseconds.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Interval other)
Compares this interval with the specified interval for order.
|
boolean |
equals(java.lang.Object that)
Checks two intervals for equality.
|
int |
getDays()
Gets the days.
|
int |
getHours()
Gets the hours.
|
int |
getMicroseconds()
Gets the microseconds.
|
int |
getMinutes()
Gets the minutes.
|
int |
getMonths()
Gets the months.
|
int |
getSeconds()
Gets the seconds.
|
int |
getYears()
Gets the years.
|
int |
hashCode()
Computes a hash code.
|
java.lang.String |
toString()
Gets a string representation that matches the ISO 8601 duration representation (https://en.wikipedia
.org/wiki/ISO_8601#Durations).
|
public Interval(int years, int months, int days, int hours, int minutes, int seconds, int microseconds)
years
- The years.months
- The months.days
- The days.hours
- The hours.minutes
- The minutes.seconds
- The seconds.microseconds
- The microseconds.HyperException
- If column is not defined as HYPER_Interval.public int getYears()
public int getMonths()
public int getDays()
public int getHours()
public int getMinutes()
public int getSeconds()
public int getMicroseconds()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object that)
equals
in class java.lang.Object
that
- The other interval.public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(Interval other)
compareTo
in interface java.lang.Comparable<Interval>
other
- The other interval.