Class AgentBuilder.RedefinitionStrategy.Listener.Compound.CompoundIterable.CompoundIterator

  • All Implemented Interfaces:
    java.util.Iterator<java.util.List<java.lang.Class<?>>>
    Enclosing class:
    AgentBuilder.RedefinitionStrategy.Listener.Compound.CompoundIterable

    protected static class AgentBuilder.RedefinitionStrategy.Listener.Compound.CompoundIterable.CompoundIterator
    extends java.lang.Object
    implements java.util.Iterator<java.util.List<java.lang.Class<?>>>
    A compound iterator that combines several iterables.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<java.lang.Iterable<? extends java.util.List<java.lang.Class<?>>>> backlog
      A backlog of iterables to still consider.
      private java.util.Iterator<? extends java.util.List<java.lang.Class<?>>> current
      The current iterator or null if no such iterator is defined.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected CompoundIterator​(java.util.List<java.lang.Iterable<? extends java.util.List<java.lang.Class<?>>>> iterables)
      Creates a compound iterator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void forward()
      Forwards the iterator to the next relevant iterable.
      boolean hasNext()
      java.util.List<java.lang.Class<?>> next()
      void remove()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Field Detail

      • current

        private java.util.Iterator<? extends java.util.List<java.lang.Class<?>>> current
        The current iterator or null if no such iterator is defined.
      • backlog

        private final java.util.List<java.lang.Iterable<? extends java.util.List<java.lang.Class<?>>>> backlog
        A backlog of iterables to still consider.
    • Constructor Detail

      • CompoundIterator

        protected CompoundIterator​(java.util.List<java.lang.Iterable<? extends java.util.List<java.lang.Class<?>>>> iterables)
        Creates a compound iterator.
        Parameters:
        iterables - The iterables to consider.
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<java.util.List<java.lang.Class<?>>>
      • next

        public java.util.List<java.lang.Class<?>> next()
        Specified by:
        next in interface java.util.Iterator<java.util.List<java.lang.Class<?>>>
      • forward

        private void forward()
        Forwards the iterator to the next relevant iterable.
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<java.util.List<java.lang.Class<?>>>