Record Class LocationAddress
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.LocationAddress
- All Implemented Interfaces:
Serializable,ApiResult
public record LocationAddress(@NotNull String countryCode, @Nullable String state, @Nullable String city, @Nullable String street)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLocationAddress(@NotNull String countryCode, @Nullable String state, @Nullable String city, @Nullable String street) Creates an instance of aLocationAddressrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Stringcity()Returns the value of thecityrecord component.@NotNull StringReturns the value of thecountryCoderecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Stringstate()Returns the value of thestaterecord component.@Nullable Stringstreet()Returns the value of thestreetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LocationAddress
public LocationAddress(@NotNull @NotNull String countryCode, @Nullable @Nullable String state, @Nullable @Nullable String city, @Nullable @Nullable String street) Creates an instance of aLocationAddressrecord class.- Parameters:
countryCode- the value for thecountryCoderecord componentstate- the value for thestaterecord componentcity- the value for thecityrecord componentstreet- the value for thestreetrecord 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 withObjects::equals(Object,Object). -
countryCode
Returns the value of thecountryCoderecord component.- Returns:
- the value of the
countryCoderecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
city
Returns the value of thecityrecord component.- Returns:
- the value of the
cityrecord component
-
street
Returns the value of thestreetrecord component.- Returns:
- the value of the
streetrecord component
-