java.lang.Object
com.aoapps.net.DomainLabels
- All Implemented Interfaces:
DtoFactory<DomainLabels>
,FastExternalizable
,Internable<DomainLabels>
,Externalizable
,Serializable
,Comparable<DomainLabels>
public final class DomainLabels
extends Object
implements Comparable<DomainLabels>, FastExternalizable, DtoFactory<DomainLabels>, Internable<DomainLabels>
Represents a set of one or more domain labels. These may be prepended to a domain name
and, as long as the total length is not exceeded, will result in a valid domain name.
- Be non-null
- Be non-empty
- May not exceed DomainName.MAX_LENGTH
- Have at least one domain label, each label separated by dots.
- Author:
- AO Industries, Inc.
- See Also:
-
Constructor Summary
ConstructorDescriptionDeprecated.Only required for implementation, do not use directly. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(DomainLabels other) Sorts by right-most label, then next to the left, then ...boolean
getDto()
long
int
hashCode()
intern()
Interns this set of labels much in the same fashion asString.intern()
.void
Gets the lower-case form of the labels.toString()
static ValidationResult
Validates a set of domain labels.static DomainLabels
void
-
Constructor Details
-
DomainLabels
Deprecated.Only required for implementation, do not use directly.- See Also:
-
-
Method Details
-
validate
Validates a set of domain labels.- See Also:
-
valueOf
- Parameters:
labels
- whennull
, returnsnull
- Throws:
ValidationException
-
equals
-
hashCode
public int hashCode() -
compareTo
Sorts by right-most label, then next to the left, then ...- Specified by:
compareTo
in interfaceComparable<DomainLabels>
-
toString
-
toLowerCase
Gets the lower-case form of the labels. If two different labels are interned and their toLowerCase is the same String instance, then they are equal in case-insensitive manner. -
intern
Interns this set of labels much in the same fashion asString.intern()
.- Specified by:
intern
in interfaceInternable<DomainLabels>
- See Also:
-
getDto
- Specified by:
getDto
in interfaceDtoFactory<DomainLabels>
-
getSerialVersionUID
public long getSerialVersionUID()- Specified by:
getSerialVersionUID
in interfaceFastExternalizable
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-