Class AgentBuilder.RedefinitionStrategy.Collector.PrependableIterator

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

    protected static class AgentBuilder.RedefinitionStrategy.Collector.PrependableIterator
    extends java.lang.Object
    implements java.util.Iterator<java.util.List<java.lang.Class<?>>>
    An iterator that allows prepending of iterables to be applied previous to another iterator.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.LinkedList<java.util.Iterator<? extends java.util.List<java.lang.Class<?>>>> backlog
      The backlog of iterators to apply.
      private java.util.Iterator<? extends java.util.List<java.lang.Class<?>>> current
      The current iterator.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PrependableIterator​(java.lang.Iterable<? extends java.util.List<java.lang.Class<?>>> origin)
      Creates a new prependable iterator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()
      java.util.List<java.lang.Class<?>> next()
      void prepend​(java.lang.Iterable<? extends java.util.List<java.lang.Class<?>>> iterable)
      Prepends an iterable to the backlog.
      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.
      • backlog

        private final java.util.LinkedList<java.util.Iterator<? extends java.util.List<java.lang.Class<?>>>> backlog
        The backlog of iterators to apply.
    • Constructor Detail

      • PrependableIterator

        protected PrependableIterator​(java.lang.Iterable<? extends java.util.List<java.lang.Class<?>>> origin)
        Creates a new prependable iterator.
        Parameters:
        origin - The original iterable to begin with.
    • Method Detail

      • prepend

        public void prepend​(java.lang.Iterable<? extends java.util.List<java.lang.Class<?>>> iterable)
        Prepends an iterable to the backlog.
        Parameters:
        iterable - The iterable to prepend.
      • 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<?>>>
      • remove

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