java.lang.Object
com.compomics.util.experiment.identification.matches_iterators.MatchesIterator
Direct Known Subclasses:
PeptideMatchesIterator, ProteinMatchesIterator, SpectrumMatchesIterator

public abstract class MatchesIterator
extends Object
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
  • Constructor Details

    • MatchesIterator

      public MatchesIterator()
      Empty default constructor
    • MatchesIterator

      public MatchesIterator​(Class className, Identification identification, WaitingHandler waitingHandler, boolean displayProgress)
      Constructor.
      Parameters:
      className - the class name
      identification - the identification where to get the matches from
      waitingHandler - the waiting handler allowing displaying progress and canceling the process
      displayProgress - 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 objects
      className - the className
      identification - the identification where to get the matchesloadPs from
      waitingHandler - the waiting handler allowing displaying progress and canceling the process
      displayProgress - boolean indicating whether the progress of this method should be displayed on the waiting handler
      filters - filters for the class
  • Method Details

    • nextObject

      public Object nextObject()
      Returns the next match and updates the buffer. Null if the iterator is done iterating.
      Returns:
      the next match