sbrt.kernel.io
Class ListResultsManager<R>

java.lang.Object
  extended by sbrt.kernel.io.AbstractResultsManager<R>
      extended by sbrt.kernel.io.ListResultsManager<R>
Type Parameters:
R - the result type.
All Implemented Interfaces:
java.lang.Iterable<R>, ResultsManager<R>

public class ListResultsManager<R>
extends AbstractResultsManager<R>
implements java.lang.Iterable<R>

This class is used to store a list of results that can be easily retrieved.

Author:
This class was written and documented by Jeremiah Wright while in the Wagner lab.

Constructor Summary
ListResultsManager()
          Constructs a new list-based results manager.
 
Method Summary
<S extends R>
void
addData(S results)
          Adds the provided results to this results manager.
 java.util.List<R> getResults()
          Returns a copy of the list of results added to this results manager.
 UnmodifiableIterator<R> iterator()
          Returns an iterator over the list of results.
 
Methods inherited from class sbrt.kernel.io.AbstractResultsManager
breakPoint, checkState, close, getName, isClosed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListResultsManager

public ListResultsManager()
Constructs a new list-based results manager.

Method Detail

iterator

public UnmodifiableIterator<R> iterator()
Returns an iterator over the list of results.

Specified by:
iterator in interface java.lang.Iterable<R>
Returns:
an iterator over the list of results.

getResults

public java.util.List<R> getResults()
Returns a copy of the list of results added to this results manager.

Returns:
a copy of the list of results added to this results manager.

addData

public <S extends R> void addData(S results)
Adds the provided results to this results manager.

Specified by:
addData in interface ResultsManager<R>
Type Parameters:
S - a type extending the primary result type.
Parameters:
results - the results to be stored.