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

com.stripe.model.PagingIterable Maven / Gradle / Ivy

There is a newer version: 26.8.0-beta.1
Show newest version
package com.stripe.model;

import java.util.Iterator;

/**
 * Provides an {@code Iterable} target that automatically iterates across all API
 * pages and which is suitable for use with a {@code foreach} loop.
 */
public class PagingIterable implements Iterable {
  private StripeCollectionInterface page;

  PagingIterable(final StripeCollectionInterface page) {
    this.page = page;
  }

  @Override
  public Iterator iterator() {
    return new PagingIterator<>(page);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy