Class TLDInfo
- java.lang.Object
-
- dk.netarkivet.harvester.datamodel.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.
-
-
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(Object o)
int
getCount()
Number of subdomains we have registered under this TLD.String
getName()
The name of this TLD (e.g.int
hashCode()
boolean
isIP()
True if this TLDinfo accumulates IP address information.
-
-
-
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.
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classObject
- See Also:
Object.equals(Object)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classObject
- 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 interfaceComparable<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.
-
-