Package net.e175.klaus.solarpositioning
Record Class SunriseResult.RegularDay
java.lang.Object
java.lang.Record
net.e175.klaus.solarpositioning.SunriseResult.RegularDay
- Record Components:
sunrise- Time of sunrise.transit- Time of transit (culmination), i.e. when the sun is closest to the zenith.sunset- Time of sunset.
- All Implemented Interfaces:
SunriseResult
- Enclosing interface:
SunriseResult
public static record SunriseResult.RegularDay(ZonedDateTime sunrise, ZonedDateTime transit, ZonedDateTime sunset)
extends Record
implements SunriseResult
Result type for a day with sunrise and sunset.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.e175.klaus.solarpositioning.SunriseResult
SunriseResult.AllDay, SunriseResult.AllNight, SunriseResult.RegularDay -
Constructor Summary
ConstructorsConstructorDescriptionRegularDay(ZonedDateTime sunrise, ZonedDateTime transit, ZonedDateTime sunset) Creates an instance of aRegularDayrecord 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.sunrise()Returns the value of thesunriserecord component.sunset()Returns the value of thesunsetrecord component.final StringtoString()Returns a string representation of this record class.transit()Returns the value of thetransitrecord component.
-
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 withObjects::equals(Object,Object). -
sunrise
Returns the value of thesunriserecord component.- Returns:
- the value of the
sunriserecord component
-
transit
Returns the value of thetransitrecord component.- Specified by:
transitin interfaceSunriseResult- Returns:
- the value of the
transitrecord component
-
sunset
Returns the value of thesunsetrecord component.- Returns:
- the value of the
sunsetrecord component
-