Record Class DomainResponse
java.lang.Object
java.lang.Record
com.maxmind.geoip2.model.DomainResponse
- Record Components:
domain- The second level domain associated with the IP address. This will be something like "example.com" or "example.co.uk", not "foo.example.com".ipAddress- The IP address that the data in the model is for.network- The network associated with the record. In particular, this is the largest network where all the fields besides IP address have the same value.
- All Implemented Interfaces:
JsonSerializable
public record DomainResponse(String domain, InetAddress ipAddress, Network network)
extends Record
implements JsonSerializable
This class provides the GeoIP2 Domain model.
-
Constructor Summary
ConstructorsConstructorDescriptionDomainResponse(String domain, InetAddress ipAddress, Network network) Creates an instance of aDomainResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptiondomain()Returns the value of thedomainrecord component.final booleanIndicates whether some other object is "equal to" this one.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.UseipAddress()instead.Deprecated, for removal: This API element is subject to removal in a future version.Usenetwork()instead.final inthashCode()Returns a hash code value for this object.Returns the value of theipAddressrecord component.network()Returns the value of thenetworkrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface JsonSerializable
toJson
-
Constructor Details
-
Method Details
-
getDomain
Deprecated, for removal: This API element is subject to removal in a future version.Usedomain()instead. This method will be removed in 6.0.0.- Returns:
- The second level domain associated with the IP address. This will be something like "example.com" or "example.co.uk", not "foo.example.com".
-
getIpAddress
Deprecated, for removal: This API element is subject to removal in a future version.UseipAddress()instead. This method will be removed in 6.0.0.- Returns:
- The IP address that the data in the model is for.
-
getNetwork
Deprecated, for removal: This API element is subject to removal in a future version.Usenetwork()instead. This method will be removed in 6.0.0.- Returns:
- The network associated with the record. In particular, this is the largest network where all the fields besides IP address have the same value.
-
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). -
domain
-
ipAddress
-
network
-
domain()instead.