public abstract class ValueIter extends Iter implements 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.
|
Iterator<Item> |
iterator() |
abstract Item |
next()
Returns the next item or
null if no other items are found. |
abstract long |
size()
Returns the iterator size.
|
abstract Value |
value()
Returns a value with all iterated items.
|
public abstract Item next()
Iter
null
if no other items are found.public abstract Item get(long i)
Iter
Iter.size()
returns the correct number of results.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 Value value()
Iter
Iter.next()
has not been called before.Copyright © 2005–2015 BaseX Team. All rights reserved.