public static DnsServerAddresses singleton(final InetSocketAddress address) {
        if (address == null) {
            throw new NullPointerException("address");
        }
        if (address.isUnresolved()) {
            throw new IllegalArgumentException("cannot use an unresolved DNS server address: " + address);
        }

        return new SingletonDnsServerAddresses(address);
    }
public static DnsServerAddresses singleton ( final InetSocketAddress address ) { if ( address == null ) { throw new NullPointerException ( "address" ) ; } if ( address . isUnresolved ( ) ) { throw new IllegalArgumentException ( "cannot use an unresolved DNS server address: " + address ) ; } return new SingletonDnsServerAddresses ( address ) ; }
Returns the {@link DnsServerAddresses} that yields only a single {@code address}.