Class TLDInfo

  • All Implemented Interfaces:
    Comparable<TLDInfo>

    public class TLDInfo
    extends Object
    implements Comparable<TLDInfo>
    A container for miscellaneous information about a TLD.

    Currently contains the TLD name and a count of subdomains.

    • Constructor Detail

      • TLDInfo

        public TLDInfo​(String name)
        Create TLD info holder.
        Parameters:
        name - The TLD domain name.
    • Method Detail

      • getName

        public String getName()
        The name of this TLD (e.g. dk, com or museum). IP addresses are registered under a special "IP address" name.
        Returns:
        TLD name without .
      • getCount

        public int getCount()
        Number of subdomains we have registered under this TLD. All IP addresses are lumped together as one TLD.
        Returns:
        Number of 2nd-level domains we have registered under this TLD.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
        Returns:
        the hashcode for this object which is equal to the hashCode for the name of the tld.
        See Also:
        Object.hashCode()
      • compareTo

        public int compareTo​(TLDInfo o)
        Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

        Specified by:
        compareTo in interface Comparable<TLDInfo>
        Parameters:
        o - the Object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        See Also:
        Comparable.compareTo(Object o)
      • isIP

        public boolean isIP()
        True if this TLDinfo accumulates IP address information.
        Returns:
        True if the domains counted in the TLDinfo are IP domains.