Class TLDInfo

  • All Implemented Interfaces:
    java.lang.Comparable<TLDInfo>

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

    Currently contains the TLD name and a count of subdomains.

    • Constructor Summary

      Constructors 
      Constructor Description
      TLDInfo​(java.lang.String name)
      Create TLD info holder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(TLDInfo o)
      Compares this object with the specified object for order.
      boolean equals​(java.lang.Object o)  
      int getCount()
      Number of subdomains we have registered under this TLD.
      java.lang.String getName()
      The name of this TLD (e.g.
      int hashCode()  
      boolean isIP()
      True if this TLDinfo accumulates IP address information.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TLDInfo

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

      • getName

        public java.lang.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.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(Object)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.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 java.lang.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.