Class CompoundIntIterator

  • All Implemented Interfaces:
    IntIterator

    public class CompoundIntIterator
    extends java.lang.Object
    implements IntIterator
    An Iterator which provides a concatenation of two IntIterators.
    • Constructor Detail

      • CompoundIntIterator

        public CompoundIntIterator​(IntIterator A,
                                   IntIterator B)
        Parameters:
        A - the first iterator in the concatenated result
        B - the second iterator in the concatenated result
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface IntIterator
        Returns:
        true iff this iterator has a next element
      • next

        public int next()
        Specified by:
        next in interface IntIterator
        Returns:
        next integer in the iteration