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