Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.result
Class MultiResult

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.result.MultiResult
All Implemented Interfaces:
Result

public class MultiResult
extends Object
implements Result

MultiResult is a result collection class.

Author:
Erich Schubert

Field Summary
private  ArrayList<Result> results
          Store the actual results
 
Constructor Summary
MultiResult()
          Constructor
MultiResult(ArrayList<Result> results)
          Constructor
 
Method Summary
 void addResult(Result r)
          Add a new result to the object
<C> ArrayList<C>
filterResults(Class<C> restrictionClass)
          Return only results of the given restriction class
<C> C
getFirstFilteredResult(Class<C> restrictionClass)
          Return first results of the given restriction class
 ArrayList<Result> getResults()
          Retrieve result array.
 void prependResult(Result r)
          Insert a new result at the beginning of the results list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

results

private ArrayList<Result> results
Store the actual results

Constructor Detail

MultiResult

public MultiResult(ArrayList<Result> results)
Constructor

Parameters:
results - Array to use for results.

MultiResult

public MultiResult()
Constructor

Method Detail

getResults

public ArrayList<Result> getResults()
Retrieve result array.

Returns:
results list

addResult

public void addResult(Result r)
Add a new result to the object

Parameters:
r - new result

prependResult

public void prependResult(Result r)
Insert a new result at the beginning of the results list

Parameters:
r - new result

filterResults

public <C> ArrayList<C> filterResults(Class<C> restrictionClass)
Return only results of the given restriction class

Type Parameters:
C -
Parameters:
restrictionClass -
Returns:
filtered results list

getFirstFilteredResult

public <C> C getFirstFilteredResult(Class<C> restrictionClass)
Return first results of the given restriction class

Type Parameters:
C -
Parameters:
restrictionClass -
Returns:
first matching result

Release 0.2 (2009-07-06_1820)