de.lmu.ifi.dbs.elki.result
Class CollectionResult<O>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.result.AbstractHierarchicalResult
      extended by de.lmu.ifi.dbs.elki.result.BasicResult
          extended by de.lmu.ifi.dbs.elki.result.CollectionResult<O>
Type Parameters:
O - data type
All Implemented Interfaces:
HierarchicalResult, IterableResult<O>, Result, Iterable<O>
Direct Known Subclasses:
ComputeROCCurve.ROCResult, EvaluatePairCountingFMeasure.ScoreResult, HistogramResult, IndexStatistics.IndexMetaResult, JudgeOutlierScores.ScoreResult, ReferencePointsResult

public class CollectionResult<O>
extends BasicResult
implements IterableResult<O>

Simple 'collection' type of result. For example, a list of NumberVectors.


Field Summary
private  Collection<O> col
          The collection represented.
private  Collection<String> header
          Meta information (printed into the header)
 
Constructor Summary
CollectionResult(String name, String shortname, Collection<O> col)
          Constructor
CollectionResult(String name, String shortname, Collection<O> col, Collection<String> header)
          Constructor
 
Method Summary
 void addHeader(String s)
          Add header information
 Collection<String> getHeader()
          Get header information
 Iterator<O> iterator()
          Implementation of the IterableResult interface, using the backing collection.
 int size()
          Get the collection size.
 
Methods inherited from class de.lmu.ifi.dbs.elki.result.BasicResult
getLongName, getShortName
 
Methods inherited from class de.lmu.ifi.dbs.elki.result.AbstractHierarchicalResult
addChildResult, getHierarchy, setHierarchy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.result.Result
getLongName, getShortName
 

Field Detail

col

private Collection<O> col
The collection represented.


header

private Collection<String> header
Meta information (printed into the header)

Constructor Detail

CollectionResult

public CollectionResult(String name,
                        String shortname,
                        Collection<O> col,
                        Collection<String> header)
Constructor

Parameters:
name - The long name (for pretty printing)
shortname - the short name (for filenames etc.)
col - Collection represented
header - Auxiliary information for result headers

CollectionResult

public CollectionResult(String name,
                        String shortname,
                        Collection<O> col)
Constructor

Parameters:
name - The long name (for pretty printing)
shortname - the short name (for filenames etc.)
col - Collection represented
Method Detail

addHeader

public void addHeader(String s)
Add header information

Parameters:
s - Header information string

getHeader

public Collection<String> getHeader()
Get header information

Returns:
header information of the result

iterator

public Iterator<O> iterator()
Implementation of the IterableResult interface, using the backing collection.

Specified by:
iterator in interface IterableResult<O>
Specified by:
iterator in interface Iterable<O>
Returns:
iterator

size

public int size()
Get the collection size.

Returns:
Collection size

Release 0.4.0 (2011-09-20_1324)