IndexIterator
, java.io.Serializable
public class IndexIteratorTriangular extends java.lang.Object implements IndexIterator, java.io.Serializable
Constructor | Description |
---|---|
IndexIteratorTriangular(int D) |
Constructs iterator that will return int arrays of length D.
|
Modifier and Type | Method | Description |
---|---|---|
int |
getD() |
Returns the length of the int array that is returned as each iterate.
|
int |
getMaxElement() |
|
int |
getMaxElementMin() |
|
boolean |
hasNext() |
Indicates whether prespecified number of iterate have been returned
since last call to reset().
|
boolean |
isAllowEqualElements() |
|
static void |
main(java.lang.String[] args) |
Method to test and demonstrate class.
|
int[] |
next() |
Returns the next iterate.
|
void |
reset() |
Sets iterator to begin returning iterates.
|
void |
setAllowEqualElements(boolean b) |
Sets flag indicating whether iterates may have elements that are equal to one another.
|
void |
setMaxElement(int maxElement) |
Sets the largest allow value for any element to have.
|
void |
setMaxElementMin(int maxElementMin) |
public IndexIteratorTriangular(int D)
public boolean hasNext()
hasNext
in interface IndexIterator
public int[] next()
next
in interface IndexIterator
public void reset()
reset
in interface IndexIterator
public int getD()
getD
in interface IndexIterator
public void setAllowEqualElements(boolean b)
public boolean isAllowEqualElements()
public int getMaxElement()
public void setMaxElement(int maxElement)
public int getMaxElementMin()
public void setMaxElementMin(int maxElementMin)
public static void main(java.lang.String[] args)