io.getstream.core.options.Offset Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stream-java Show documentation
Show all versions of stream-java Show documentation
Stream Feeds Java Client for backend and android integrations
package io.getstream.core.options;
import static com.google.common.base.Preconditions.checkArgument;
import io.getstream.core.http.Request;
public final class Offset implements RequestOption {
private final int offset;
public Offset(int value) {
checkArgument(value >= 0, "offset can't be negative");
offset = value;
}
@Override
public void apply(Request.Builder builder) {
if (offset > 0) {
builder.addQueryParameter("offset", Integer.toString(offset));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy