code: public URI construct(Map<String, String> options) {
      // make a copy that can be modified
      Map<String, String> uriData = Maps.newLinkedHashMap(options);
      try {
        // scheme should always be present, but default if necessary
        String scheme = defaults.get(SCHEME);
        if (uriData.containsKey(SCHEME)) {
          scheme = uriData.remove(SCHEME);
        }
  
        StringBuilder builder = new StringBuilder();
        builder.append(scheme).append(":");
  
        if (!pattern.isOpaque()) {
          // Build the URI(String,String,String,int,String,String,String)
          StringBuilder authBuilder = new StringBuilder();
          String user = constructUserInfo(uriData, defaults);
          String host = removeNonDefault(HOST, uriData, defaults);
          int port = constructPort(uriData, defaults);
          if (user != null) {
            authBuilder.append(user).append("@");
          }
          if (host != null) {
            authBuilder.append(host);
          }
          if (port >= 0) {
            authBuilder.append(":").append(port);
          }
          String auth = authBuilder.toString();
          if (!auth.isEmpty()) {
            builder.append("//").append(auth);
          }
        }
  
        builder.append(constructPath(uriData, patternPath));
  
        String query = constructQuery(uriData, defaults);
        if (query != null) {
          builder.append("?").append(query);
        }
  
        return new URI(builder.toString());
  
      } catch (URISyntaxException ex) {
        throw new IllegalArgumentException("Could not build URI", ex);
      }
    }
docs: Constructs a {@link URI} that matches this pattern from the given options.
  
  @param options a map of variable and
  @return a {@link URI} that matches this pattern
  @throws IllegalArgumentException if the URI cannot be constructed