public class FixedSumIterator
extends java.lang.Object
| Constructor | Description |
|---|---|
FixedSumIterator(int arrayLength) |
Creates a FixedSumIterator with the given array length.
|
| Modifier and Type | Method | Description |
|---|---|---|
static void |
main(java.lang.String[] args) |
|
int[] |
next() |
|
void |
reset() |
Sets the iterator to begin iteration.
|
void |
setSum(int sum) |
Specifies the target sum that defines the iterates.
|
public FixedSumIterator(int arrayLength)
arrayLength - the length of the generated arrays.public static void main(java.lang.String[] args)
public void reset()
public void setSum(int sum)
sum - the fixed target sum.public int[] next()