|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.javatest.util.ReadAheadIterator
public class ReadAheadIterator
An iterator that can read ahead of the current position, either for performance reasons or to help find out the number of items returned by an iterator before accessing them.
Field Summary | |
---|---|
static int |
FULL
A constant indicating that full read ahead is required. |
static int |
LIMITED
A constant indicating that limited read ahead is required. |
static int |
NONE
A constant indicating that no read ahead is required. |
Constructor Summary | |
---|---|
ReadAheadIterator(java.util.Iterator source,
int mode)
Create a ReadAheadIterator. |
|
ReadAheadIterator(java.util.Iterator source,
int mode,
int amount)
Create a ReadAheadIterator. |
Method Summary | |
---|---|
int |
getItemsFoundCount()
Get the number of items read (so far) from the underlying source iterator. |
int |
getOutputQueueSize()
Deprecated. Will not be supported in the future. |
int |
getUsedElementCount()
Deprecated. Will not be supported in the future. |
boolean |
hasNext()
|
boolean |
isReadAheadComplete()
Check if all available items from the underlying source iterator have been read. |
boolean |
isSourceExhausted()
Deprecated. Use hasNext(). |
java.lang.Object |
next()
|
void |
remove()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NONE
ReadAheadIterator(java.util.Iterator, int, int)
,
Constant Field Valuespublic static final int LIMITED
ReadAheadIterator(java.util.Iterator, int, int)
,
Constant Field Valuespublic static final int FULL
ReadAheadIterator(java.util.Iterator, int, int)
,
Constant Field ValuesConstructor Detail |
---|
public ReadAheadIterator(java.util.Iterator source, int mode)
source
- The iterator from which to read aheadmode
- A value indicating the type of read ahead required.NONE
,
LIMITED
,
FULL
public ReadAheadIterator(java.util.Iterator source, int mode, int amount)
source
- The iterator from which to read ahead.mode
- A value indicating the type of read ahead required.amount
- A value indicating the amount of read ahead required,
if the mode is set to LIMITED. If the mode is NON or FULL, this
parameter will be ignored.NONE
,
LIMITED
,
FULL
Method Detail |
---|
public boolean isReadAheadComplete()
public int getItemsFoundCount()
isReadAheadComplete()
public boolean isSourceExhausted()
public int getUsedElementCount()
getNext()
.
getItemsFoundCount()
public int getOutputQueueSize()
public boolean hasNext()
hasNext
in interface java.util.Iterator
public java.lang.Object next()
next
in interface java.util.Iterator
public void remove()
remove
in interface java.util.Iterator
java.lang.UnsupportedOperationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |