public abstract class ValueIter extends Iter implements java.lang.Iterable<Item>
Iterable interface, which is why all of its
values can also be retrieved via enhanced for (for-each) loops. Note, however, that
using the next() method will give you better performance.| Constructor and Description |
|---|
ValueIter() |
| Modifier and Type | Method and Description |
|---|---|
abstract Item |
get(long i)
Returns the specified item, or an arbitrary item if the index is invalid.
|
java.util.Iterator<Item> |
iterator() |
abstract Item |
next()
Returns the next item or
null if no other items are found. |
abstract boolean |
reset()
Resets the iterator and returns
true if operation was successful. |
abstract long |
size()
Returns the iterator size.
|
Value |
value()
Returns a sequence with all iterator values.
|
public abstract Item next()
Iternull if no other items are found.public abstract Item get(long i)
IterIter.size() returns the correct number of results. A calling method
should call Iter.reset() after the last items has been retrieved.public abstract long size()
Iter-1 is returned if the
result size is unknown. If this method is implemented by an iterator,
Iter.get(long) needs to be implemented as well.public abstract boolean reset()
Itertrue if operation was successful.
false is returned if the iterator cannot be reset.public Value value()
IterIter.next() has not been called before.