java.lang.Object
com.maxmind.db.DatabaseRecord<T>
- Type Parameters:
T
- the type to deserialize the returned value to
DatabaseRecord represents the data and metadata associated with a database
lookup.
-
Constructor Summary
ConstructorDescriptionDatabaseRecord
(T data, InetAddress ipAddress, int prefixLength) Create a new record. -
Method Summary
-
Constructor Details
-
DatabaseRecord
Create a new record.- Parameters:
data
- the data for the record in the database.ipAddress
- the IP address used in the lookup.prefixLength
- the network prefix length associated with the record in the database.
-
-
Method Details
-
getData
- Returns:
- the data for the record in the database. The record will be
null
if there was no data for the address in the database.
-
getNetwork
- Returns:
- the network associated with the record in the database. This is the largest network where all of the IPs in the network have the same data.
-