|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.uoa.di.madgik.grs.reader.RandomReaderIterator<T>
T
- The type of Record
s as defined in the respective RandomReader
public class RandomReaderIterator<T extends Record>
A list iterator implementing class that can be used to iterate over the Record
s accessible through a
RandomReader
instance
Method Summary | |
---|---|
void |
add(T o)
|
boolean |
hasNext()
|
boolean |
hasPrevious()
|
T |
next()
|
int |
nextIndex()
|
T |
previous()
|
int |
previousIndex()
|
void |
remove()
|
void |
set(T o)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean hasNext()
If the status of the reader indicates that there may be more Record
s available but have not yet reached the
current reader through the respective mirroring procedure, then the ForwardReader.waitAvailable(long, java.util.concurrent.TimeUnit)
is used with the timeout values defined by RandomReader.getIteratorTimeout()
and RandomReader.getIteratorTimeUnit()
hasNext
in interface java.util.Iterator<T extends Record>
hasNext
in interface java.util.ListIterator<T extends Record>
Iterator.hasNext()
public T next()
the RandomReader.get(long, java.util.concurrent.TimeUnit)
method is used to retrieve the next available
Record
. The timeout values used are the ones defined by RandomReader.getIteratorTimeout()
and
RandomReader.getIteratorTimeUnit()
. in case there is some error during the Record
retrieval or
the timeout expired, null is returned
next
in interface java.util.Iterator<T extends Record>
next
in interface java.util.ListIterator<T extends Record>
Iterator.next()
public boolean hasPrevious()
If the status of the reader indicates that there are previous Record
s true is returned. Otherwise false
hasPrevious
in interface java.util.ListIterator<T extends Record>
Iterator.hasNext()
public T previous()
The RandomReader.seek(long)
method is used to move back the necessary number of records so that the next call to
RandomReader.get()
will return the previous record. If some error occurs during the record retrieval, null is returned
previous
in interface java.util.ListIterator<T extends Record>
ListIterator.previous()
public int nextIndex()
Operation is not supported. An IllegalStateException
is thrown upon invocation
nextIndex
in interface java.util.ListIterator<T extends Record>
ListIterator.nextIndex()
public int previousIndex()
Operation is not supported. An IllegalStateException
is thrown upon invocation
previousIndex
in interface java.util.ListIterator<T extends Record>
ListIterator.previousIndex()
public void remove()
Operation is not supported. An IllegalStateException
is thrown upon invocation
remove
in interface java.util.Iterator<T extends Record>
remove
in interface java.util.ListIterator<T extends Record>
ListIterator.remove()
public void set(T o)
Operation is not supported. An IllegalStateException
is thrown upon invocation
set
in interface java.util.ListIterator<T extends Record>
ListIterator.set(java.lang.Object)
public void add(T o)
Operation is not supported. An IllegalStateException
is thrown upon invocation
add
in interface java.util.ListIterator<T extends Record>
ListIterator.add(java.lang.Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |