Package net.sf.saxon.z
Class IntRepeatIterator
- java.lang.Object
-
- net.sf.saxon.z.IntRepeatIterator
-
- All Implemented Interfaces:
IntIterator
public class IntRepeatIterator extends java.lang.Object implements IntIterator
An iterator over a single integer repeated a fixed number of times
-
-
Constructor Summary
Constructors Constructor Description IntRepeatIterator(int value, int count)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Test whether there are any more integers in the sequence; and change the state of the iterator so a call onIntIterator.next()
delivers the next integer.int
next()
Return the next integer in the sequence.
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
Description copied from interface:IntIterator
Test whether there are any more integers in the sequence; and change the state of the iterator so a call onIntIterator.next()
delivers the next integer.The effect of calling
#hasNext()
a second time without an intervening call on#next()
is undefined.- Specified by:
hasNext
in interfaceIntIterator
- Returns:
- true if there are more integers to come
-
next
public int next()
Description copied from interface:IntIterator
Return the next integer in the sequence. The result is undefined unless#hasNext()
has been called and has returned true.- Specified by:
next
in interfaceIntIterator
- Returns:
- the next integer in the sequence
-
-