| Constructor and Description |
|---|
ItemCache()
Constructor.
|
ItemCache(int c)
Constructor.
|
ItemCache(Item[] it,
int s)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Item it)
Adds a single item.
|
void |
add(Value val)
Adds the contents of a value.
|
Item |
get(long i)
Returns the specified item, or an arbitrary item if the index is invalid.
|
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 if operation was successful. |
boolean |
sameAs(Result v)
Compares results for equality.
|
void |
serialize(Serializer ser)
Serializes the complete result.
|
void |
serialize(Serializer ser,
int n)
Serializes the specified result.
|
void |
set(Item i,
int p)
Sets an item to the specified position.
|
long |
size()
Returns the iterator size.
|
void |
size(int s)
Sets the iterator size.
|
java.lang.String |
toString() |
Value |
value()
Returns a sequence with all iterator values.
|
public Item[] item
public ItemCache()
public ItemCache(int c)
c - initial capacitypublic ItemCache(Item[] it, int s)
it - item arrays - sizepublic void add(Value val)
val - value to be addedpublic void add(Item it)
it - item to be addedpublic boolean sameAs(Result v)
Resultpublic void serialize(Serializer ser) throws java.io.IOException
Resultpublic void serialize(Serializer ser, int n) throws java.io.IOException
Resultpublic Item next()
Iternull if no other items are found.public void pos(int p)
p - positionpublic void size(int s)
s - sizepublic boolean reset()
Itertrue if operation was successful.
false is returned if the iterator cannot be reset.public 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 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 void set(Item i, int p)
i - item to be setp - positionpublic Value value()
IterIter.next() has not been called before.public java.lang.String toString()
toString in class java.lang.Object