Package dev.tobee.telegram.model
Record Class Location
java.lang.Object
java.lang.Record
dev.tobee.telegram.model.Location
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.heading()Returns the value of theheadingrecord component.Returns the value of thehorizontalAccuracyrecord component.floatlatitude()Returns the value of thelatituderecord component.Returns the value of thelivePeriodrecord component.floatReturns the value of thelongituderecord component.Returns the value of theproximityAlertRadiusrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
Location
public Location(float longitude, float latitude, Optional<Float> horizontalAccuracy, Optional<Integer> livePeriod, Optional<Integer> heading, Optional<Integer> proximityAlertRadius)Creates an instance of aLocationrecord class.- Parameters:
longitude- the value for thelongituderecord componentlatitude- the value for thelatituderecord componenthorizontalAccuracy- the value for thehorizontalAccuracyrecord componentlivePeriod- the value for thelivePeriodrecord componentheading- the value for theheadingrecord componentproximityAlertRadius- the value for theproximityAlertRadiusrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
longitude
public float longitude()Returns the value of thelongituderecord component.- Returns:
- the value of the
longituderecord component
-
latitude
public float latitude()Returns the value of thelatituderecord component.- Returns:
- the value of the
latituderecord component
-
horizontalAccuracy
Returns the value of thehorizontalAccuracyrecord component.- Returns:
- the value of the
horizontalAccuracyrecord component
-
livePeriod
Returns the value of thelivePeriodrecord component.- Returns:
- the value of the
livePeriodrecord component
-
heading
Returns the value of theheadingrecord component.- Returns:
- the value of the
headingrecord component
-
proximityAlertRadius
Returns the value of theproximityAlertRadiusrecord component.- Returns:
- the value of the
proximityAlertRadiusrecord component
-