code: public InetSocketAddress asInetSocketAddress(Function<String, Integer> serviceMapper) {
  		if(isValid()) {
  			Integer port = getPort();
  			if(port == null && serviceMapper != null) {
  				String service = getService();
  				if(service != null) {
  					port = serviceMapper.apply(service);
  				}
  			}
  			if(port != null) {
  				IPAddress ipAddr;
  				if(isAddressString() && (ipAddr = asAddress()) != null) {
  					return new InetSocketAddress(ipAddr.toInetAddress(), port);
  				} else {
  					return new InetSocketAddress(getHost(), port);
  				}
  			}
  		}
  		return null;
  	}
docs: Returns the InetSocketAddress for this host.  A host must have an associated port,
  or a service name string that is mapped to a port using the provided service mapper,
  to have a corresponding InetSocketAddress.
  <p>
  If there is on associated port, then this returns null.
  <p>
  Note that host name strings are not resolved when using this method.
  
  @param serviceMapper maps service name strings to ports.
  Returns null when a service string has no mapping, otherwise returns the port for a given service.
  You can use a project like netdb to provide a service mapper lambda, https://github.com/jnr/jnr-netdb
  @return the socket address, or null if no such address.