Record Class Postal
java.lang.Object
java.lang.Record
com.maxmind.geoip2.record.Postal
- Record Components:
code- The postal code of the location. Postal codes are not available for all countries. In some countries, this will only contain part of the postal code.confidence- A value from 0-100 indicating MaxMind's confidence that the postal code is correct. This attribute is only available from the Insights web service and the GeoIP2 Enterprise database.
- All Implemented Interfaces:
JsonSerializable
Contains data for the postal record associated with an IP address.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the value of thecoderecord component.Returns the value of theconfidencerecord component.final booleanIndicates whether some other object is "equal to" this one.getCode()Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Useconfidence()instead.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Methods inherited from interface JsonSerializable
toJson
-
Constructor Details
-
Postal
public Postal()Constructs aPostalrecord. -
Postal
Creates an instance of aPostalrecord class.- Parameters:
code- the value for thecoderecord componentconfidence- the value for theconfidencerecord component
-
-
Method Details
-
getCode
Deprecated, for removal: This API element is subject to removal in a future version.Usecode()instead. This method will be removed in 6.0.0.- Returns:
- The postal code of the location. Postal codes are not available for all countries. In some countries, this will only contain part of the postal code.
-
getConfidence
Deprecated, for removal: This API element is subject to removal in a future version.Useconfidence()instead. This method will be removed in 6.0.0.- Returns:
- A value from 0-100 indicating MaxMind's confidence that the postal code is correct. This attribute is only available from the Insights web service and the GeoIP2 Enterprise database.
-
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
-
confidence
Returns the value of theconfidencerecord component.- Returns:
- the value of the
confidencerecord component
-
code()instead.