public Optional<DomainName> parent() {
        int offset = value().indexOf('.');
        if (offset == -1 || offset == value().length() - 1)
            return Optional.empty();
        return Optional.of(DomainName.of(value().substring(offset + 1)));
    }
A valid domain name, which can be used in a {@link java.net.URI}.

@author jonmv
vespajlib/src/main/java/ai/vespa/http/DomainName.java