Class ConcatIt<O>

  • Type Parameters:
    O - Data type
    All Implemented Interfaces:
    It<O>, Iter

    public class ConcatIt<O>
    extends java.lang.Object
    implements It<O>
    Concatenate multiple iterators.
    Since:
    0.7.5
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int it
      Current iterator.
      private It<? extends O>[] its
      Iterators
    • Constructor Summary

      Constructors 
      Constructor Description
      ConcatIt​(It<? extends O>... its)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      It<O> advance()
      Moves the iterator forward to the next entry.
      O get()
      Access the current object.
      boolean valid()
      Returns true if the iterator currently points to a valid object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • its

        private It<? extends O>[] its
        Iterators
      • it

        private int it
        Current iterator.
    • Constructor Detail

      • ConcatIt

        @SafeVarargs
        public ConcatIt​(It<? extends O>... its)
        Constructor.
        Parameters:
        its - Iterators to concatenate
    • Method Detail

      • valid

        public boolean valid()
        Description copied from interface: Iter
        Returns true if the iterator currently points to a valid object.
        Specified by:
        valid in interface Iter
        Returns:
        a boolean value, whether the position is valid.
      • get

        public O get()
        Description copied from interface: It
        Access the current object.
        Specified by:
        get in interface It<O>
        Returns:
        Current object
      • advance

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