Package org.basex.query.iter
Class Iter
java.lang.Object
org.basex.query.iter.Iter
Iterator interface.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(long i) Returns the specified item, or an arbitrary item if the index is invalid.If available, returns a value on which the iterator is based on.abstract Itemnext()Returns the next item.longsize()Returns the iterator size.value(QueryContext qc, Expr expr) Returns a value with all iterated items.
-
Constructor Details
-
Iter
public Iter()
-
-
Method Details
-
next
Returns the next item.- Returns:
- resulting item, or
nullif all items have been returned - Throws:
QueryException- query exception
-
get
Returns the specified item, or an arbitrary item if the index is invalid. If this method returns items,size()needs to be implemented as well.- Parameters:
i- value offset (starting with 0)- Returns:
- specified item or
null - Throws:
QueryException- query exception
-
size
Returns the iterator size.-1is returned if the result size is unknown. If this method returns a positive value,get(long)needs to be implemented as well.- Returns:
- number of entries
- Throws:
QueryException- query exception
-
iterValue
If available, returns a value on which the iterator is based on.- Returns:
- value or
null
-
value
Returns a value with all iterated items. This method should always be called before single items have been requested. Otherwise, it might not return all items.- Parameters:
qc- query contextexpr- original expression (can benull; if assigned, type of result sequence will be refined)- Returns:
- value
- Throws:
QueryException- query exception
-