Package org.cloudburstmc.netty.signaling
Record Class ProviderClient.Location
java.lang.Object
java.lang.Record
org.cloudburstmc.netty.signaling.ProviderClient.Location
- Enclosing class:
- ProviderClient
public static record ProviderClient.Location(String country, String city, Double latitude, Double longitude)
extends Record
Where the operator says the host runs: a country, coordinates or both. Coordinates come together.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncity()Returns the value of thecityrecord component.country()Returns the value of thecountryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.latitude()Returns the value of thelatituderecord component.Returns the value of thelongituderecord component.static ProviderClient.LocationReads the host configuration keyscountry,city,latitudeandlongitude.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Location
Creates an instance of aLocationrecord class.- Parameters:
country- the value for thecountryrecord componentcity- the value for thecityrecord componentlatitude- the value for thelatituderecord componentlongitude- the value for thelongituderecord component
-
-
Method Details
-
of
Reads the host configuration keyscountry,city,latitudeandlongitude.- Returns:
- null when nothing is declared
-
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). -
country
Returns the value of thecountryrecord component.- Returns:
- the value of the
countryrecord component
-
city
Returns the value of thecityrecord component.- Returns:
- the value of the
cityrecord component
-
latitude
Returns the value of thelatituderecord component.- Returns:
- the value of the
latituderecord component
-
longitude
Returns the value of thelongituderecord component.- Returns:
- the value of the
longituderecord component
-