Package net.bytebuddy.build
Class Plugin.Engine.Source.Compound.Origin.CompoundIterator
- java.lang.Object
-
- net.bytebuddy.build.Plugin.Engine.Source.Compound.Origin.CompoundIterator
-
- All Implemented Interfaces:
java.util.Iterator<Plugin.Engine.Source.Element>
- Enclosing class:
- Plugin.Engine.Source.Compound.Origin
protected static class Plugin.Engine.Source.Compound.Origin.CompoundIterator extends java.lang.Object implements java.util.Iterator<Plugin.Engine.Source.Element>
A compound iterator that combines several iterables.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Queue<? extends java.lang.Iterable<? extends Plugin.Engine.Source.Element>>backlogA backlog of iterables to still consider.private java.util.Iterator<? extends Plugin.Engine.Source.Element>currentThe current iterator ornullif no such iterator is defined.
-
Constructor Summary
Constructors Modifier Constructor Description protectedCompoundIterator(java.util.List<? extends java.lang.Iterable<? extends Plugin.Engine.Source.Element>> iterables)Creates a compound iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidforward()Forwards the iterator to the next relevant iterable.booleanhasNext()Plugin.Engine.Source.Elementnext()voidremove()
-
-
-
Field Detail
-
current
@MaybeNull private java.util.Iterator<? extends Plugin.Engine.Source.Element> current
The current iterator ornullif no such iterator is defined.
-
backlog
private final java.util.Queue<? extends java.lang.Iterable<? extends Plugin.Engine.Source.Element>> backlog
A backlog of iterables to still consider.
-
-
Constructor Detail
-
CompoundIterator
protected CompoundIterator(java.util.List<? extends java.lang.Iterable<? extends Plugin.Engine.Source.Element>> iterables)
Creates a compound iterator.- Parameters:
iterables- The iterables to consider.
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<Plugin.Engine.Source.Element>
-
next
public Plugin.Engine.Source.Element next()
- Specified by:
nextin interfacejava.util.Iterator<Plugin.Engine.Source.Element>
-
forward
private void forward()
Forwards the iterator to the next relevant iterable.
-
remove
public void remove()
- Specified by:
removein interfacejava.util.Iterator<Plugin.Engine.Source.Element>
-
-