|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TXMLObjectIterator
TXMLObjectIterator is a bidirectional iterator to iterate over a list of TXMLObject instances. It�s behaviour is similar to the java.util.ListIterator. The methods of the iterator may throw two different kind of exceptions. If there are problems accessing Tamino the TIteratorException is thrown. If the iterator moves beyond the boundaries of the result set the TNoSuchXMLObjectException is thrown. Note that two TXMLObject instances representing the same Tamino document retrieved via an iterator may not necessarily be identical Java objects. You should therefore not use the Java comparator "==" to decide whether two TXMLObject instances represent the same Tamino document.
Alternating calls to next and previous will return the same TXMLObject instance repeatedly. If you call moveBy with a positive argument n, it has the same effect on the position of the iterator as calling next n times. If you call moveBy with a negative argument n, it has the same effect on the iterator as calling previous n times. Calling moveBy with a zero argument has no effect.
Method Summary | |
---|---|
boolean |
canMoveBy(int offset)
Indicates if this iterator can be moved by the given offset. |
void |
close()
Closes this iterator. |
int |
getCount()
Gets the query count as an int. |
boolean |
hasCount()
Indicates if the response of Tamino contained the query count. |
boolean |
hasNext()
Returns true if this iterator has more TXMLObject instances when traversing the list in the forward direction. |
boolean |
hasPrevious()
Returns true if this list iterator has more TXMLObject instances when traversing the list in the reverse direction. |
void |
moveBy(int offset)
Moves the iterator by the given offset. |
TXMLObject |
next()
Returns the next element in the list of TXMLObject instances. |
TXMLObject |
previous()
Returns the previous TXMLObject instance in the list. |
void |
reset()
Resets the iterator to its initial state. |
Method Detail |
---|
boolean hasNext()
TXMLObject next() throws TNoSuchXMLObjectException, TIteratorException
TNoSuchXMLObjectException
- the if iteration has no next TXMLObject instance.
TIteratorException
- signals an error while attempting to access Tamino.boolean hasPrevious()
TXMLObject previous() throws TNoSuchXMLObjectException, TIteratorException
TNoSuchXMLObjectException
- if the iteration has no previous TXMLObject instance.
TIteratorException
- signals an error while attempting to access Tamino.boolean hasCount()
int getCount()
boolean canMoveBy(int offset) throws TIteratorException
offset
- the positive or negative amount to move the iterator
TIteratorException
- signals an error while attempting to access Tamino.void moveBy(int offset) throws TNoSuchXMLObjectException, TIteratorException
offset
- the positive or negative amount to move the iterator
TNoSuchXMLObjectException
- if the new position is out of bounds.
TIteratorException
- signals an error while attempting to access Tamino.void reset() throws TIteratorException
TIteratorException
- signals an error while attempting to access Tamino.void close() throws TIteratorException
TIteratorExceptionsignals
- an error while attempting to access Tamino.
TIteratorException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |