Record Class Location
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.Location
- All Implemented Interfaces:
Serializable,ApiResult
public record Location(Float longitude, Float latitude, @Nullable Float horizontalAccuracy, int livePeriod, int heading, int proximityAlertRadius)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
Constructors -
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.intheading()Returns the value of theheadingrecord component.@Nullable FloatReturns the value of thehorizontalAccuracyrecord component.latitude()Returns the value of thelatituderecord component.intReturns the value of thelivePeriodrecord component.Returns the value of thelongituderecord component.intReturns the value of theproximityAlertRadiusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Location
public Location(Float longitude, Float latitude, @Nullable @Nullable Float horizontalAccuracy, int livePeriod, int heading, int 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
Returns the value of thelongituderecord component.- Returns:
- the value of the
longituderecord component
-
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
public int livePeriod()Returns the value of thelivePeriodrecord component.- Returns:
- the value of the
livePeriodrecord component
-
heading
public int heading()Returns the value of theheadingrecord component.- Returns:
- the value of the
headingrecord component
-
proximityAlertRadius
public int proximityAlertRadius()Returns the value of theproximityAlertRadiusrecord component.- Returns:
- the value of the
proximityAlertRadiusrecord component
-