Package org.basex.query.iter
Class BasicIter<I extends Item>
java.lang.Object
org.basex.query.iter.Iter
org.basex.query.iter.BasicIter<I>
- Type Parameters:
I- generic item type
- All Implemented Interfaces:
Iterable<I>
Basic iterator, throwing no exceptions.
This class also implements the
Iterable interface. Hence, all values can also be
retrieved via an enhanced for-loop. Using next() is faster.- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Details
-
size
protected final long sizeResult size. -
pos
protected long posCurrent position.
-
-
Constructor Details
-
BasicIter
protected BasicIter(long size) Constructor.- Parameters:
size- size
-
-
Method Details
-
get
Description copied from class:IterReturns the specified item, or an arbitrary item if the index is invalid. If this method returns items,Iter.size()needs to be implemented as well. -
next
Description copied from class:IterReturns the next item. -
size
public final long size()Description copied from class:IterReturns the iterator size.-1is returned if the result size is unknown. If this method returns a positive value,Iter.get(long)needs to be implemented as well. -
iterator
-