protected static final class JobListRefiner.TopIterator extends java.lang.Object implements java.util.Iterator<UWSJob>
It is also possible to inverse the order of these N first items by setting
the last constructor parameter to true.
Note:
This iterator does not support the remove operation ;
the function remove() will then return an
UnsupportedOperationException.
| Constructor and Description |
|---|
TopIterator(java.util.List<UWSJob> joblist,
int topSize,
boolean reverse)
Create an iterator which will read the
topSize first
item of the given list. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
UWSJob |
next() |
void |
remove() |
public TopIterator(java.util.List<UWSJob> joblist, int topSize, boolean reverse)
topSize first
item of the given list.joblist - List of jobs to return.topSize - Number of items to read from the beginning of the
list.reverse - true if the topSize first
items must be read in the given order,
false if they must be read in the
reverse order.