Package net.e175.klaus.solarpositioning
Record Class SolarPosition
java.lang.Object
java.lang.Record
net.e175.klaus.solarpositioning.SolarPosition
- Record Components:
azimuth- Azimuth angle in degrees, measured from North (0°) going eastwards.zenithAngle- Zenith angle in degrees, measured from zenith (0°) downwards.
A simple data class for keeping an azimuth/zenith angle pair of values.
-
Constructor Summary
ConstructorsConstructorDescriptionSolarPosition(double azimuth, double zenithAngle) Creates an instance of aSolarPositionrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleazimuth()Returns the value of theazimuthrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thezenithAnglerecord component.
-
Constructor Details
-
SolarPosition
public SolarPosition(double azimuth, double zenithAngle) Creates an instance of aSolarPositionrecord class.- Parameters:
azimuth- the value for theazimuthrecord componentzenithAngle- the value for thezenithAnglerecord component
-
-
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 '=='. -
azimuth
public double azimuth()Returns the value of theazimuthrecord component.- Returns:
- the value of the
azimuthrecord component
-
zenithAngle
public double zenithAngle()Returns the value of thezenithAnglerecord component.- Returns:
- the value of the
zenithAnglerecord component
-