Record Class Subdivision
java.lang.Object
java.lang.Record
io.leandev.appfuse.almanac.location.Subdivision
- Record Components:
code- 完整 ISO 3166-2 代碼(如US-CA)country- 所屬國家的 alpha-2 代碼(如US)name- 名稱type- 類型(如State、Special Municipality)
- All Implemented Interfaces:
Serializable
-
Constructor Summary
ConstructorsConstructorDescriptionSubdivision(String code, String country, String name, String type) Creates an instance of aSubdivisionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the value of thecoderecord 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.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Method Details
-
toString
-
hashCode
-
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). -
code
-
country
-
name
-
type
-