Record Class Interval
java.lang.Object
java.lang.Record
io.codemine.java.postgresql.codecs.Interval
- Record Components:
time- time component in microsecondsday- day componentmonth- month component (may be decomposed into years and months for display)
PostgreSQL
interval type. A time span with separate month, day, and microsecond
components.-
Constructor Summary
ConstructorsConstructorDescriptionInterval(long time, int day, int month) Creates an instance of aIntervalrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintday()Returns the value of thedayrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmonth()Returns the value of themonthrecord component.longtime()Returns the value of thetimerecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
time
public long time()Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-
day
public int day()Returns the value of thedayrecord component.- Returns:
- the value of the
dayrecord component
-
month
public int month()Returns the value of themonthrecord component.- Returns:
- the value of the
monthrecord component
-