Code example for ImmutableMultimap.Builder

Methods: build, put

0
   @Override 
   public <R extends HttpRequest> R bindToRequest(R request, Object input) {
      checkArgument(input instanceof ResourceLimit, "this binder is only valid for ResourceLimit");
      ResourceLimit limit = (ResourceLimit) input;
      Builder<String, String> builder = ImmutableMultimap.<String, String> builder();
      builder.put("resourcetype", limit.getResourceType().getCode() + "");
      builder.put("account", limit.getAccount());
      builder.put("domainid", limit.getDomainId());
      builder.put("max", limit.getMax() + "");
      return (R) request.toBuilder().replaceQueryParams(builder.build()).build();
   } 
} 
Experience pair programming with AI  Get Codota for Java