All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.getstream.core.options.Limit Maven / Gradle / Ivy

There is a newer version: 3.15.0
Show newest version
package io.getstream.core.options;

import static com.google.common.base.Preconditions.checkArgument;

import io.getstream.core.http.Request;

public final class Limit implements RequestOption {
  private final int limit;

  public Limit(int value) {
    checkArgument(value >= 0, "limit can't be negative");
    limit = value;
  }

  @Override
  public void apply(Request.Builder builder) {
    builder.addQueryParameter("limit", Integer.toString(limit));
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy