All Implemented Interfaces:
CharSequence, Comparable<DnsLabel>
Direct Known Subclasses:
LeadingOrTrailingHyphenLabel, OtherNonLdhLabel, UnderscoreLabel

public abstract class NonLdhLabelextends DnsLabel
A DNS label which contains more than just letters, digits and a hyphen.
  • Constructor Details

    • NonLdhLabel

      protected NonLdhLabel(String label)
      Creates a label of this flavour, validating the text against the IDN rules.
      Parameters:
      label - the label text this instance represents, checked against the IDN rules
  • Method Details

    • fromInternal

      protected static DnsLabel fromInternal(String label)
      Chooses the concrete label class matching a non-LDH label's flavour.
      Parameters:
      label - the internal label form to classify
      Returns:
      the UnderscoreLabel, LeadingOrTrailingHyphenLabel or OtherNonLdhLabel for that text