code: public static ServerAddress fromString(String string) {
      String tokens[] = string.split(":");
      if (tokens.length == 1) {
        return new ServerAddress(tokens[0], null);
      }
      return new ServerAddress(tokens[0], Integer.valueOf(tokens[1]));
    }
docs: Creates a new ServerAddress instance from a string matching the format
  <code>host:port</code>.
  
  @param string a string matching the format <code>host:port</code>.
  
  @return A new ServerAddress instance based on the string representation.