public interface Builder<T> extends Iterable<T>
Blocks that can then be built.| Modifier and Type | Method and Description |
|---|---|
Builder<T> |
add(Block<T> block)
Add a new
Block to be built. |
T |
build()
Build all the blocks into a final result.
|
boolean |
isEmpty() |
Iterable<T> |
iterable(int iterations)
Creates an iterable for this builder that will iterate the supplied number of times.
|
boolean isEmpty()
true if no blocks have been added, otherwise false.T build()
Iterable<T> iterable(int iterations)
If the supplied number of iterations is less than the number of Blocks then only that number of blocks
will be built and have their results returned.
If the supplied number of iterations is greater than the number of Blocks then all blocks will be built
and the final result of the built Blocks will be passed back into the first Block where they will
be iterated through again until the supplied number of iterations is reached.
Copyright © 2016. All rights reserved.