Package com.maxmind.db
Class DatabaseRecord<T>
- java.lang.Object
-
- com.maxmind.db.DatabaseRecord<T>
-
public final class DatabaseRecord<T> extends java.lang.Object
DatabaseRecord represents the data and metadata associated with a database lookup.
-
-
Constructor Summary
Constructors Constructor Description DatabaseRecord(T data, java.net.InetAddress ipAddress, int prefixLength)
Create a new record.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getData()
Network
getNetwork()
-
-
-
Constructor Detail
-
DatabaseRecord
public DatabaseRecord(T data, java.net.InetAddress ipAddress, int prefixLength)
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 Detail
-
getData
public T 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
public Network 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.
-
-