> + *
> + * @author Roman Coedo
> + */
> +public class PaginationOptions extends BaseHttpRequestOptions {
> +
> + private static int MIN_LIMIT = 1;
> + private static int MAX_LIMIT = 1000;
> +
> + public PaginationOptions marker(String marker) {
> + queryParameters.put("marker", checkNotNull(marker, "marker"));
> + return this;
> + }
> +
> + public PaginationOptions limit(int limit) {
> + checkState(limit >= MIN_LIMIT, "limit must be >= " + MIN_LIMIT);
> + checkState(limit <= MAX_LIMIT, "limit must be <= " + MAX_LIMIT);
Use `checkArgument` instead to throw an `IllegalArgumentException`?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/4/files#r12843336