Package dev.grafeo.gwp.types
Record Class GqlLocalTime
java.lang.Object
java.lang.Record
dev.grafeo.gwp.types.GqlLocalTime
- Record Components:
hour- the hour (0-23)minute- the minute (0-59)second- the second (0-59)nanosecond- the nanosecond (0-999999999)
A GQL local time value (no timezone).
-
Constructor Summary
ConstructorsConstructorDescriptionGqlLocalTime(int hour, int minute, int second, int nanosecond) Creates an instance of aGqlLocalTimerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.inthour()Returns the value of thehourrecord component.intminute()Returns the value of theminuterecord component.intReturns the value of thenanosecondrecord component.intsecond()Returns the value of thesecondrecord component.Convert to a JavaLocalTime.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GqlLocalTime
public GqlLocalTime(int hour, int minute, int second, int nanosecond) Creates an instance of aGqlLocalTimerecord class.- Parameters:
hour- the value for thehourrecord componentminute- the value for theminuterecord componentsecond- the value for thesecondrecord componentnanosecond- the value for thenanosecondrecord component
-
-
Method Details
-
toLocalTime
Convert to a JavaLocalTime.- Returns:
- the equivalent LocalTime
-
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 '=='. -
hour
public int hour()Returns the value of thehourrecord component.- Returns:
- the value of the
hourrecord component
-
minute
public int minute()Returns the value of theminuterecord component.- Returns:
- the value of the
minuterecord component
-
second
public int second()Returns the value of thesecondrecord component.- Returns:
- the value of the
secondrecord component
-
nanosecond
public int nanosecond()Returns the value of thenanosecondrecord component.- Returns:
- the value of the
nanosecondrecord component
-