code: @Nullable
      public StandardProtocolFamily ipFamily() {
          ensureSingle();
          switch (hostType) {
              case HOSTNAME_AND_IPv4:
              case IPv4_ONLY:
                  return StandardProtocolFamily.INET;
              case HOSTNAME_AND_IPv6:
              case IPv6_ONLY:
                  return StandardProtocolFamily.INET6;
              default:
                  return null;
          }
      }
docs: Returns the {@link StandardProtocolFamily} of this endpoint's IP address.
  
  @return the {@link StandardProtocolFamily} of this endpoint's IP address, or
  {@code null} if the host name is not resolved yet
  @throws IllegalStateException if this endpoint is not a host but a group