Class DatabaseRecord<T>

java.lang.Object
com.maxmind.db.DatabaseRecord<T>

public final class DatabaseRecord<T> extends Object
DatabaseRecord represents the data and metadata associated with a database lookup.
  • Constructor Details

    • DatabaseRecord

      public DatabaseRecord(T data, 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 Details

    • 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.