Interface UnfailingIterator

    • Method Detail

      • next

        Item next()
        Get the next item in the sequence.
        Specified by:
        next in interface SequenceIterator
        Returns:
        the next Item. If there are no more items, return null.
      • forEach

        default void forEach​(java.util.function.Consumer<? super Item> consumer)
        Process all the items returned by the iterator, supplying them to a given Consumer. Note that this method throws no exceptions. This method consumes the iterator.
        Parameters:
        consumer - the function that is to consume each of the (remaining) items returned by the iterator
      • toList

        default java.util.List<Item> toList()
        Create a list containing all the items returned by the iterator. This method consumes the iterator.
        Returns:
        a list containing all the (remaining) items returned by the iterator