Interface It<O>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      It<O> advance()
      Moves the iterator forward to the next entry.
      default <T extends java.util.Collection<? super O>>
      T
      collect​(T c)
      Collect the output in a colection.
      default <T> It<T> filter​(java.lang.Class<? super T> clz)
      Filtered iteration.
      default It<O> filter​(java.util.function.Predicate<? super O> predicate)
      Filtered iteration.
      default boolean find​(java.lang.Object o)
      Find a given object in the iterator; consumes the iterator.
      default void forEach​(java.util.function.Consumer<? super O> action)
      Process the remaining elements - this will invalidate the iterator.
      O get()
      Access the current object.
      • Methods inherited from interface elki.utilities.datastructures.iterator.Iter

        valid
    • Method Detail

      • get

        O get()
        Access the current object.
        Returns:
        Current object
      • advance

        It<O> advance()
        Description copied from interface: Iter
        Moves the iterator forward to the next entry.
        Specified by:
        advance in interface Iter
        Returns:
        The iterator itself.
      • filter

        default <T> It<T> filter​(java.lang.Class<? super T> clz)
        Filtered iteration.

        Important: using the filtered iterator will also advance this iterator; so usually you should stop using the original iterator after calling this method.

        Parameters:
        clz - Class filter
        Returns:
        Filtered iterator.
      • filter

        default It<O> filter​(java.util.function.Predicate<? super O> predicate)
        Filtered iteration.

        Important: using the filtered iterator will also advance this iterator; so usually you should stop using the original iterator after calling this method.

        Parameters:
        predicate - Test
        Returns:
        Filtered iterator.
      • find

        default boolean find​(java.lang.Object o)
        Find a given object in the iterator; consumes the iterator.
        Parameters:
        o - Object to find
        Returns:
        true if found
      • forEach

        default void forEach​(java.util.function.Consumer<? super O> action)
        Process the remaining elements - this will invalidate the iterator.
        Parameters:
        action - Action to perform
      • collect

        default <T extends java.util.Collection<? super O>> T collect​(T c)
        Collect the output in a colection.
        Parameters:
        c - Collection