Record Class WorldTimeApiService.WorldTimeInfo
java.lang.Object
java.lang.Record
com.serinity.exercicecontrol.service.WorldTimeApiService.WorldTimeInfo
- Enclosing class:
WorldTimeApiService
public static record WorldTimeApiService.WorldTimeInfo(String timezone, OffsetDateTime dateTime, int hour, WorldTimeApiService.DayPhase phase)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionWorldTimeInfo(String timezone, OffsetDateTime dateTime, int hour, WorldTimeApiService.DayPhase phase) Creates an instance of aWorldTimeInforecord class. -
Method Summary
Modifier and TypeMethodDescriptiondateTime()Returns the value of thedateTimerecord component.final 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.phase()Returns the value of thephaserecord component.timezone()Returns the value of thetimezonerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WorldTimeInfo
public WorldTimeInfo(String timezone, OffsetDateTime dateTime, int hour, WorldTimeApiService.DayPhase phase) Creates an instance of aWorldTimeInforecord class.- Parameters:
timezone- the value for thetimezonerecord componentdateTime- the value for thedateTimerecord componenthour- the value for thehourrecord componentphase- the value for thephaserecord component
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
timezone
Returns the value of thetimezonerecord component.- Returns:
- the value of the
timezonerecord component
-
dateTime
Returns the value of thedateTimerecord component.- Returns:
- the value of the
dateTimerecord component
-
hour
public int hour()Returns the value of thehourrecord component.- Returns:
- the value of the
hourrecord component
-
phase
Returns the value of thephaserecord component.- Returns:
- the value of the
phaserecord component
-