V
- the typepublic class ProgressIterator<V> extends java.lang.Object implements java.util.Iterator<V>, ProgressObservable
The returned progress percentage will always be between 0 or 1 (inclusive). If the iterator returns more entries than the total count, then 100% will be returned for the progress.
Modifier and Type | Method and Description |
---|---|
static <V> ProgressIterator<V> |
create(java.util.Iterator<V> iterator,
int count)
Create a new instance.
|
static <V> ProgressIterator<V> |
create(java.util.List<V> list)
Create a new instance from a list.
|
Progress |
getProgress()
Get the current percentage of completion.
|
boolean |
hasNext() |
V |
next() |
void |
remove() |
public boolean hasNext()
hasNext
in interface java.util.Iterator<V>
public void remove()
remove
in interface java.util.Iterator<V>
public Progress getProgress()
ProgressObservable
getProgress
in interface ProgressObservable
public static <V> ProgressIterator<V> create(java.util.Iterator<V> iterator, int count)
V
- the typeiterator
- the iteratorcount
- the number of objectspublic static <V> ProgressIterator<V> create(java.util.List<V> list)
V
- the typelist
- a list