All Implemented Interfaces:
CharSequence, Comparable<DnsLabel>

public final class LeadingOrTrailingHyphenLabelextends NonLdhLabel
A DNS label with a leading or trailing hyphen ('-').
  • Constructor Details

    • LeadingOrTrailingHyphenLabel

      LeadingOrTrailingHyphenLabel(String label)
      Create label
      Parameters:
      label - the full label text, which is expected to have a leading or trailing hyphen
  • Method Details

    • isLeadingOrTrailingHypenLabelInternal

      static boolean isLeadingOrTrailingHypenLabelInternal(String label)
      Test whether a label begins or ends with a hyphen.
      Parameters:
      label - the label text to inspect; an empty label is not a hyphen label
      Returns:
      true if label starts or ends with hyphen