Class FilteringResultIterator
- java.lang.Object
-
- org.intermine.webservice.server.output.FilteringResultIterator
-
- All Implemented Interfaces:
java.util.Iterator<java.util.List<ResultElement>>
public class FilteringResultIterator extends java.lang.Object implements java.util.Iterator<java.util.List<ResultElement>>
A result iterator that skips things we aren't interested in.- Author:
- Alex Kalderimis
-
-
Constructor Summary
Constructors Constructor Description FilteringResultIterator(Results res)
Construct a new iterator which does no filtering.FilteringResultIterator(Results res, int start, int size, java.lang.String filterTerm)
Construct a new iterator which filters to things that match a filter term and only returns results in a given window.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
java.util.List<ResultElement>
next()
void
remove()
-
-
-
Constructor Detail
-
FilteringResultIterator
public FilteringResultIterator(Results res)
Construct a new iterator which does no filtering.- Parameters:
res
- The results to wrap.
-
FilteringResultIterator
public FilteringResultIterator(Results res, int start, int size, java.lang.String filterTerm)
Construct a new iterator which filters to things that match a filter term and only returns results in a given window.- Parameters:
res
- The results to wrap.start
- The index of the first result to return.size
- The maximum number of results to return.filterTerm
- A filter term.
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<java.util.List<ResultElement>>
-
next
public java.util.List<ResultElement> next()
- Specified by:
next
in interfacejava.util.Iterator<java.util.List<ResultElement>>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<java.util.List<ResultElement>>
-
-