Class LazyCollection.FlattenSetIterator

  • All Implemented Interfaces:
    java.util.Iterator<java.lang.Object>
    Enclosing class:
    LazyCollection<E>

    public static class LazyCollection.FlattenSetIterator
    extends LazyCollection.ReadOnlyIterator<java.lang.Object>
    Recursively flattens any nested Iterables by iterating over their elements as well. Removes any duplicates from the returned elements.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Iterator<?> current  
      protected java.util.Iterator<?> inner  
      protected java.lang.Object next  
      protected boolean nextSet  
      protected java.util.Set<?> returnedValues  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()
      java.lang.Object next()
      • Methods inherited from class java.lang.Object

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

        forEachRemaining
    • Field Detail

      • inner

        protected final java.util.Iterator<?> inner
      • returnedValues

        protected final java.util.Set<?> returnedValues
      • current

        protected java.util.Iterator<?> current
      • next

        protected java.lang.Object next
      • nextSet

        protected boolean nextSet
    • Constructor Detail

      • FlattenSetIterator

        public FlattenSetIterator​(java.lang.Iterable<?> inner)
        Creates a new LazyCollection.FlattenSetIterator around inner.
        Parameters:
        inner - the underlying collection
    • Method Detail

      • hasNext

        public boolean hasNext()
        See Also:
        Iterator.hasNext()
      • next

        public java.lang.Object next()
        See Also:
        Iterator.next()