Package mondrian.util

Class IteratorIterable<E>

  • All Implemented Interfaces:
    java.lang.Iterable<E>

    public class IteratorIterable<E>
    extends java.lang.Object
    implements java.lang.Iterable<E>
    Iterable over an iterator.

    It can be restarted. As you iterate, it stores elements in a backing array. If you call iterator() again, it will first replay elements from that array.

    • Constructor Summary

      Constructors 
      Constructor Description
      IteratorIterable​(java.util.Iterator<E> iterator)
      Creates an IteratorIterable.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<E> iterator()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • IteratorIterable

        public IteratorIterable​(java.util.Iterator<E> iterator)
        Creates an IteratorIterable.
    • Method Detail

      • iterator

        public java.util.Iterator<E> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<E>