public final class BooleanIterator extends java.lang.Object implements BoundedIterator<java.lang.Boolean>
Constructor and Description |
---|
BooleanIterator()
Constructs a boolean iterator with the initial value equal to
false . |
BooleanIterator(boolean initialValue)
Constructs a boolean iterator with the given initial value.
|
Modifier and Type | Method and Description |
---|---|
BooleanIterator |
clone()
Creates a copy of the iterator.
|
boolean |
hasValue()
Checks if the iterator is not exhausted (a value is available).
|
void |
init()
Initializes the iterator.
|
void |
next()
Makes an iteration.
|
void |
setValue(boolean value)
Sets the current value of the iterator.
|
int |
size()
Returns the size of the collection of the iterated items.
|
void |
stop()
Stops the iterator.
|
java.lang.Boolean |
value()
Returns the current value of the iterator.
|
public BooleanIterator(boolean initialValue)
initialValue
- the initial value.public BooleanIterator()
false
.public void setValue(boolean value)
value
- the value to be set.public void init()
Iterator
public boolean hasValue()
Iterator
public java.lang.Boolean value()
Iterator
public void next()
Iterator
public void stop()
Iterator
public int size()
BoundedIterator
size
in interface BoundedIterator<java.lang.Boolean>
public BooleanIterator clone()
Iterator