Package slash.navigation.common
Record Class LongitudeAndLatitude
java.lang.Object
java.lang.Record
slash.navigation.common.LongitudeAndLatitude
Longitude and latitude for common navigation usage
- Author:
- Christian Pesch
-
Constructor Summary
ConstructorsConstructorDescriptionLongitudeAndLatitude(double longitude, double latitude) Creates an instance of aLongitudeAndLatituderecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.doublelatitude()Returns the value of thelatituderecord component.doubleReturns the value of thelongituderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LongitudeAndLatitude
public LongitudeAndLatitude(double longitude, double latitude) Creates an instance of aLongitudeAndLatituderecord class.- Parameters:
longitude- the value for thelongituderecord componentlatitude- the value for thelatituderecord component
-
-
Method Details
-
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 '=='. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
longitude
public double longitude()Returns the value of thelongituderecord component.- Returns:
- the value of the
longituderecord component
-
latitude
public double latitude()Returns the value of thelatituderecord component.- Returns:
- the value of the
latituderecord component
-