|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.query.iter.Iter
org.basex.query.iter.SeqIter
public final class SeqIter
Sequence iterator.
Field Summary | |
---|---|
Item[] |
item
Items. |
Fields inherited from class org.basex.query.iter.Iter |
---|
EMPTY |
Constructor Summary | |
---|---|
SeqIter()
Constructor. |
|
SeqIter(int c)
Constructor. |
|
SeqIter(Item[] it,
int s)
Constructor. |
|
SeqIter(QueryContext c)
Constructor, specifying the query context. |
Method Summary | |
---|---|
void |
add(Item it)
Adds a single item. |
void |
add(Iter iter)
Adds the contents of an iterator. |
Item |
finish()
Returns a sequence from all iterator values. |
static SeqIter |
get(Iter iter)
Returns the argument, if it is a sequence iterator. |
Item |
get(long i)
Returns the specified item. |
Item |
next()
Returns the next item or null if no other items are found. |
void |
pos(int p)
Sets the iterator position. |
boolean |
reset()
Resets the iterator and returns true. |
boolean |
same(Result v)
Compares values for equality. |
void |
serialize(Serializer ser)
Serializes the complete result. |
void |
serialize(Serializer ser,
int n)
Serializes the specified result. |
int |
size()
Returns the number of entries. |
void |
size(int s)
Sets the iterator size. |
String |
toString()
|
Methods inherited from class org.basex.query.iter.Iter |
---|
reverse |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Item[] item
Constructor Detail |
---|
public SeqIter()
public SeqIter(int c)
c
- initial capacitypublic SeqIter(QueryContext c)
c
- query contextpublic SeqIter(Item[] it, int s)
it
- item arrays
- sizeMethod Detail |
---|
public static SeqIter get(Iter iter) throws QueryException
iter
- iterator
QueryException
- query exceptionpublic void add(Iter iter) throws QueryException
iter
- entry to be added
QueryException
- query exceptionpublic void add(Item it)
it
- item to be addedpublic boolean same(Result v)
Result
same
in interface Result
v
- value to be compared
public void serialize(Serializer ser) throws IOException
Result
serialize
in interface Result
ser
- serializer
IOException
- I/O exceptionpublic void serialize(Serializer ser, int n) throws IOException
Result
serialize
in interface Result
ser
- serializern
- results offset to serialize
IOException
- I/O exceptionpublic Item next()
Iter
next
in class Iter
public void pos(int p)
p
- positionpublic void size(int s)
s
- sizepublic boolean reset()
Iter
reset
in class Iter
public int size()
Iter
Iter.get(long)
has to be implemented as well.
size
in interface Result
size
in class Iter
public Item get(long i)
Iter
get
in class Iter
i
- value offset
public Item finish()
Iter
Iter.next()
.
finish
in class Iter
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |