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>>
backlog
A backlog of iterables to still consider.private java.util.Iterator<? extends Plugin.Engine.Source.Element>
current
The current iterator ornull
if no such iterator is defined.
-
Constructor Summary
Constructors Modifier Constructor Description protected
CompoundIterator(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 void
forward()
Forwards the iterator to the next relevant iterable.boolean
hasNext()
Plugin.Engine.Source.Element
next()
void
remove()
-
-
-
Field Detail
-
current
@MaybeNull private java.util.Iterator<? extends Plugin.Engine.Source.Element> current
The current iterator ornull
if 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:
hasNext
in interfacejava.util.Iterator<Plugin.Engine.Source.Element>
-
next
public Plugin.Engine.Source.Element next()
- Specified by:
next
in 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:
remove
in interfacejava.util.Iterator<Plugin.Engine.Source.Element>
-
-