Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.result.CollectionResult<O>
Type Parameters:
O - data type
All Implemented Interfaces:
IterableResult<O>, Result, Iterable<O>

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

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

Author:
Erich Schubert

Field Summary
private  Collection<O> col
          The collection represented.
private  Collection<String> header
          Meta information (printed into the header)
 
Constructor Summary
CollectionResult(Collection<O> col)
          Constructor
CollectionResult(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(Collection<O> col,
                        Collection<String> header)
Constructor

Parameters:
col - Collection represented
header - Auxiliary information for result headers

CollectionResult

public CollectionResult(Collection<O> col)
Constructor

Parameters:
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

Release 0.2 (2009-07-06_1820)