uk.ac.liv.util
Class BaseNIterator
java.lang.Object
uk.ac.liv.util.BaseNIterator
- All Implemented Interfaces:
- java.util.Iterator
- public class BaseNIterator
- extends java.lang.Object
- implements java.util.Iterator
An iterator that enumerates the base N representation of every
non-negative integer that can be represented within the specified number
of digits.
- Version:
- $Revision: 1.2 $
- Author:
- Steve Phelps
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
currentNumber
protected int currentNumber
base
protected int base
numDigits
protected int numDigits
maximumNumber
protected int maximumNumber
BaseNIterator
public BaseNIterator(int base,
int numDigits)
next
public java.lang.Object next()
- Specified by:
next in interface java.util.Iterator
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface java.util.Iterator
remove
public void remove()
- Specified by:
remove in interface java.util.Iterator
convert
protected int[] convert()