Class MatchesIterator
java.lang.Object
com.compomics.util.experiment.identification.matches_iterators.MatchesIterator
- Direct Known Subclasses:
PeptideMatchesIterator,ProteinMatchesIterator,SpectrumMatchesIterator
An abstract iterator class to iterate identification matches. Note: multiple
threads are synchronized using semaphores. Should a thread be interrupted,
the exception will be sent as RunTimeException. This is because our tools
recover from these exceptions similarly as for other unchecked exceptions.
Please contact us if you need another/better exception handling.
- Author:
- Dominik Kopczynski, Marc Vaudel, Harald Barsnes
-
Constructor Summary
ConstructorsConstructorDescriptionMatchesIterator(long[] keys, Class className, Identification identification, WaitingHandler waitingHandler, boolean displayProgress, String filters) Constructor.MatchesIterator(Class className, Identification identification, WaitingHandler waitingHandler, boolean displayProgress) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the next match and updates the buffer.
-
Constructor Details
-
MatchesIterator
public MatchesIterator(Class className, Identification identification, WaitingHandler waitingHandler, boolean displayProgress) Constructor.- Parameters:
className- the class nameidentification- the identification where to get the matches fromwaitingHandler- the waiting handler allowing displaying progress and canceling the processdisplayProgress- boolean indicating whether the progress of this method should be displayed on the waiting handler
-
MatchesIterator
public MatchesIterator(long[] keys, Class className, Identification identification, WaitingHandler waitingHandler, boolean displayProgress, String filters) Constructor.- Parameters:
keys- the keys of the objectsclassName- the classNameidentification- the identification where to get the matchesloadPs fromwaitingHandler- the waiting handler allowing displaying progress and canceling the processdisplayProgress- boolean indicating whether the progress of this method should be displayed on the waiting handlerfilters- filters for the class
-
-
Method Details
-
nextObject
Returns the next match and updates the buffer. Null if the iterator is done iterating or the iteration has been cancelled.- Returns:
- the next match
-