All Implemented Interfaces:
CharSequence, Comparable<DnsLabel>
Direct Known Subclasses:
XnLabel

public class ReservedLdhLabelextends LdhLabel
A reserved LDH label (R-LDH label), which have the property that they contain "--" in the third and fourth characters.
  • Constructor Details

    • ReservedLdhLabel

      protected ReservedLdhLabel(String label)
      Wrap a label already known to carry the reserved "--" pattern.
      Parameters:
      label - the LDH label string, which must carry "--" in its third and fourth characters
  • Method Details

    • isReservedLdhLabel

      public static boolean isReservedLdhLabel(String label)
      Test whether a label is both well-formed LDH and reserved.
      Parameters:
      label - the candidate label string, checked for LDH syntax before the reserved "--" pattern is tested
      Returns:
      true if the string is a well-formed LDH label with "--" in its third and fourth characters
    • isReservedLdhLabelInternal

      static boolean isReservedLdhLabelInternal(String label)
      Test for the reserved "--" pattern, skipping the LDH syntax check.
      Parameters:
      label - the label string, assumed to be already known to be a well-formed LDH label
      Returns:
      true if it is at least four characters long and its third and fourth characters are both '-'