de.lmu.ifi.dbs.elki.data
Class MultiRepresentedObject<O extends DatabaseObject>
java.lang.Object
de.lmu.ifi.dbs.elki.data.AbstractDatabaseObject
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
Constructor Summary |
MultiRepresentedObject(List<O> representations)
Provides a MultiRepresentedObject comprising the specified representations. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
representations
private List<O extends DatabaseObject> representations
- Holds the different representations of this object.
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
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