Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.data
Class MultiRepresentedObject<O extends DatabaseObject>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.data.AbstractDatabaseObject
      extended by de.lmu.ifi.dbs.elki.data.MultiRepresentedObject<O>
Type Parameters:
O - the type of represented DatabaseObjects
All Implemented Interfaces:
DatabaseObject

public class MultiRepresentedObject<O extends DatabaseObject>
extends AbstractDatabaseObject

MultiRepresentedObject represents a collection of several DatabaseObjects of a same superclass.

Author:
Elke Achtert

Field Summary
private  List<O> representations
          Holds the different representations of this object.
 
Constructor Summary
MultiRepresentedObject(List<O> representations)
          Provides a MultiRepresentedObject comprising the specified representations.
 
Method Summary
 int getNumberOfRepresentations()
          Returns the number of representations.
 O getRepresentation(int i)
          Returns the ith representation of this object
 
Methods inherited from class de.lmu.ifi.dbs.elki.data.AbstractDatabaseObject
getID, setID
 
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.data.DatabaseObject
equals
 

Field Detail

representations

private List<O extends DatabaseObject> representations
Holds the different representations of this object.

Constructor Detail

MultiRepresentedObject

public MultiRepresentedObject(List<O> representations)
Provides a MultiRepresentedObject comprising the specified representations. If representation at index i does not exist, the representations array must return a null value for this index.

Parameters:
representations - an array of the representations
Method Detail

getRepresentation

public O getRepresentation(int i)
Returns the ith representation of this object

Parameters:
i - the index of the representation to be retuned
Returns:
the ith representation of this object

getNumberOfRepresentations

public int getNumberOfRepresentations()
Returns the number of representations.

Returns:
the number of representations

Release 0.3 (2010-03-31_1612)