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 theaddressrecord component.Returns the value of thedetailedNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.iataCode()Returns the value of theiataCoderecord component.name()Returns the value of thenamerecord component.subType()Returns the value of thesubTyperecord component.Returns the value of thetimeZoneOffsetrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Location
public Location(String type, String subType, String name, String detailedName, String timeZoneOffset, String iataCode, Address address) Creates an instance of aLocationrecord class.- Parameters:
type- the value for thetyperecord componentsubType- the value for thesubTyperecord componentname- the value for thenamerecord componentdetailedName- the value for thedetailedNamerecord componenttimeZoneOffset- the value for thetimeZoneOffsetrecord componentiataCode- the value for theiataCoderecord componentaddress- the value for theaddressrecord 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 thetyperecord component.- Returns:
- the value of the
typerecord component
-
subType
Returns the value of thesubTyperecord component.- Returns:
- the value of the
subTyperecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
detailedName
Returns the value of thedetailedNamerecord component.- Returns:
- the value of the
detailedNamerecord component
-
timeZoneOffset
Returns the value of thetimeZoneOffsetrecord component.- Returns:
- the value of the
timeZoneOffsetrecord component
-
iataCode
Returns the value of theiataCoderecord component.- Returns:
- the value of the
iataCoderecord component
-
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-