Class StackedIter<B,​A extends B>

  • Type Parameters:
    A - Type of first hierarchy
    B - Type of second level hierarchy
    All Implemented Interfaces:
    It<B>, Iter

    public class StackedIter<B,​A extends B>
    extends java.lang.Object
    implements It<B>
    Filtered iterator.
    Since:
    0.7.0
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Hierarchy<B> hier2
      Secondary hierarchy.
      private It<? extends A> it1
      Iterator in primary hierarchy.
      private It<B> it2
      Iterator in secondary hierarchy.
    • Constructor Summary

      Constructors 
      Constructor Description
      StackedIter​(It<? extends A> it1, Hierarchy<B> hier2)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      StackedIter<B,​A> advance()
      Moves the iterator forward to the next entry.
      B 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

      • it1

        private It<? extends A extends B> it1
        Iterator in primary hierarchy.
      • hier2

        private Hierarchy<B> hier2
        Secondary hierarchy.
      • it2

        private It<B> it2
        Iterator in secondary hierarchy.
    • Constructor Detail

      • StackedIter

        public StackedIter​(It<? extends A> it1,
                           Hierarchy<B> hier2)
        Constructor.
        Parameters:
        it1 - Iterator in primary hierarchy
        hier2 - Iterator in secondary hierarchy
    • Method Detail

      • get

        public B get()
        Description copied from interface: It
        Access the current object.
        Specified by:
        get in interface It<B>
        Returns:
        Current object
      • 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.
      • advance

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