public abstract static class AbstractItemIterator.AbstractBuilder<BuilderType extends AbstractItemIterator.AbstractBuilder<?,ProductType>,ProductType extends AbstractItemIterator>
extends java.lang.Object
AbstractItemIterator
.Modifier and Type | Field and Description |
---|---|
protected boolean |
reverse
True, if the items should be iterated in reverse order, false otherwise.
|
protected int |
start
The index of the first item, which should be iterated.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractBuilder()
Creates a new builder, which allows to configure and create instances of the class
AbstractItemIterator . |
Modifier and Type | Method and Description |
---|---|
abstract ProductType |
create()
Creates the iterator, which has been configured by using the builder.
|
BuilderType |
reverse(boolean reverse)
Sets, whether the items should be iterated in reverse order, or not.
|
BuilderType |
start(int start)
Sets the index of the first item, which should be iterated.
|
protected boolean reverse
protected int start
protected AbstractBuilder()
AbstractItemIterator
.@NonNull public abstract ProductType create()
ItemIterator
. The iterator may not be null@NonNull public BuilderType reverse(boolean reverse)
reverse
- True, if the items should be iterated in reverse order, false otherwise@NonNull public BuilderType start(int start)
start
- The index, which should be set, as an Integer
value or -1, if all items
should be iterated