|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TNonXMLObjectIterator
TNonXMLObjectIterator is a bidirectional iterator to iterate over a list of TNonXMLObject 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 TNoSuchNonXMLObjectException is thrown. Note that two TNonXMLObject 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 TNonXMLObject instances represent the same Tamino document.
Alternating calls to next and previous will return the same TNonXMLObject 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. |
boolean |
hasNext()
Returns true if this iterator has more TNonXMLObject instances when traversing the list in the forward direction. |
boolean |
hasPrevious()
Returns true if this list iterator has more TNonXMLObject instances when traversing the list in the reverse direction. |
void |
moveBy(int offset)
Moves the iterator by the given offset. |
TNonXMLObject |
next()
Returns the next element in the list of TNonXMLObject instances. |
TNonXMLObject |
previous()
Returns the previous TNonXMLObject instance in the list. |
void |
reset()
Resets the iterator to its initial state. |
Method Detail |
---|
boolean hasNext()
TNonXMLObject next() throws TNoSuchNonXMLObjectException, TIteratorException
TNoSuchNonXMLObjectException
- the if iteration has no next TNonXMLObject instance.
TIteratorException
- signals an error while attempting to access Tamino.boolean hasPrevious()
TNonXMLObject previous() throws TNoSuchNonXMLObjectException, TIteratorException
TNoSuchNonXMLObjectException
- if the iteration has no previous TNonXMLObject instance.
TIteratorException
- signals an error while attempting to access Tamino.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 TNoSuchNonXMLObjectException, TIteratorException
offset
- the positive or negative amount to move the iterator
TNoSuchNonXMLObjectException
- 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 |