Class CachingIterable<T>

  • Type Parameters:
    T - the type of the iterable.
    All Implemented Interfaces:
    Closeable, AutoCloseable, Iterable<T>

    public class CachingIterable<T>
    extends Object
    implements Closeable, Iterable<T>
    A CachingIterable is a Closeable Iterable that attempts to cache the iterable the first time it is read. Subsequently, when iterator is called, an iterator to the cached iterable is returned. The caching is disabled if the iterable size is greater than a provided max size. By default this is 100,000.