Record Class Metadata

java.lang.Object
java.lang.Record
com.maxmind.db.Metadata
Record Components:
binaryFormatMajorVersion - The major version number for the database's binary format.
binaryFormatMinorVersion - The minor version number for the database's binary format.
buildEpoch - The date of the database build.
databaseType - A string that indicates the structure of each data record associated with an IP address. The actual definition of these structures is left up to the database creator.
languages - List of languages supported by the database.
description - Map from language code to description in that language.
ipVersion - Whether the database contains IPv4 or IPv6 address data. The only possible values are 4 and 6.
nodeCount - The number of nodes in the search tree.
recordSize - The number of bits in a record in the search tree. Note that each node consists of two records.

public record Metadata(int binaryFormatMajorVersion, int binaryFormatMinorVersion, BigInteger buildEpoch, String databaseType, List<String> languages, Map<String,String> description, int ipVersion, long nodeCount, int recordSize) extends Record
Metadata holds data associated with the database itself.
  • Constructor Details

    • Metadata

      public Metadata(int binaryFormatMajorVersion, int binaryFormatMinorVersion, BigInteger buildEpoch, String databaseType, List<String> languages, Map<String,String> description, int ipVersion, long nodeCount, int recordSize)
      Compact constructor for the Metadata record.
  • Method Details

    • buildTime

      public Instant buildTime()
      Returns:
      the instant of the database build in UTC.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • binaryFormatMajorVersion

      public int binaryFormatMajorVersion()
      Returns the value of the binaryFormatMajorVersion record component.
      Returns:
      the value of the binaryFormatMajorVersion record component
    • binaryFormatMinorVersion

      public int binaryFormatMinorVersion()
      Returns the value of the binaryFormatMinorVersion record component.
      Returns:
      the value of the binaryFormatMinorVersion record component
    • buildEpoch

      public BigInteger buildEpoch()
      Returns the value of the buildEpoch record component.
      Returns:
      the value of the buildEpoch record component
    • databaseType

      public String databaseType()
      Returns the value of the databaseType record component.
      Returns:
      the value of the databaseType record component
    • languages

      public List<String> languages()
      Returns the value of the languages record component.
      Returns:
      the value of the languages record component
    • description

      public Map<String,String> description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • ipVersion

      public int ipVersion()
      Returns the value of the ipVersion record component.
      Returns:
      the value of the ipVersion record component
    • nodeCount

      public long nodeCount()
      Returns the value of the nodeCount record component.
      Returns:
      the value of the nodeCount record component
    • recordSize

      public int recordSize()
      Returns the value of the recordSize record component.
      Returns:
      the value of the recordSize record component