Code example for ImmutableMultimap.Builder

Methods: build, put

0
   @Override 
   public <R extends HttpRequest> R bindToRequest(R request, Object input) {
      checkArgument(input instanceof SnapshotPolicySchedule, "this binder is only valid for SnapshotPolicySchedule");
      SnapshotPolicySchedule schedule = SnapshotPolicySchedule.class.cast(input);
      Builder<String, String> builder = ImmutableMultimap.<String, String> builder();
      builder.put("intervaltype", schedule.getInterval().toString());
      builder.put("schedule", schedule.getTime().toString());
      return (R) request.toBuilder().replaceQueryParams(builder.build()).build();
   } 
}