Package records
Record Class Location
java.lang.Object
java.lang.Record
records.Location
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddress()
Returns the value of theaddress
record component.Returns the value of thedetailedName
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.iataCode()
Returns the value of theiataCode
record component.name()
Returns the value of thename
record component.subType()
Returns the value of thesubType
record component.Returns the value of thetimeZoneOffset
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.
-
Constructor Details
-
Location
public Location(String type, String subType, String name, String detailedName, String timeZoneOffset, String iataCode, Address address) Creates an instance of aLocation
record class.- Parameters:
type
- the value for thetype
record componentsubType
- the value for thesubType
record componentname
- the value for thename
record componentdetailedName
- the value for thedetailedName
record componenttimeZoneOffset
- the value for thetimeZoneOffset
record componentiataCode
- the value for theiataCode
record componentaddress
- the value for theaddress
record 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)
. -
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
subType
Returns the value of thesubType
record component.- Returns:
- the value of the
subType
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
detailedName
Returns the value of thedetailedName
record component.- Returns:
- the value of the
detailedName
record component
-
timeZoneOffset
Returns the value of thetimeZoneOffset
record component.- Returns:
- the value of the
timeZoneOffset
record component
-
iataCode
Returns the value of theiataCode
record component.- Returns:
- the value of the
iataCode
record component
-
address
Returns the value of theaddress
record component.- Returns:
- the value of the
address
record component
-