Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.database
Class ObjectAndAssociations<O extends DatabaseObject>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.database.ObjectAndAssociations<O>

public class ObjectAndAssociations<O extends DatabaseObject>
extends Object

Provides a single database objects and a map of associations associated with this object.

Author:
Elke Achtert

Field Summary
private  Associations associations
          The map of associations associated with the database objects.
private  O object
          The database object.
 
Constructor Summary
ObjectAndAssociations(O object, Associations associations)
          Provides a single database objects and a map of associations associated with this object.
 
Method Summary
<T> void
addAssociation(AssociationID<T> associationID, T association)
          Adds the given association with the specified association ID.
 Associations getAssociations()
          Returns the associations associated with the database object.
 O getObject()
          Returns the database object.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

object

private final O extends DatabaseObject object
The database object.


associations

private final Associations associations
The map of associations associated with the database objects.

Constructor Detail

ObjectAndAssociations

public ObjectAndAssociations(O object,
                             Associations associations)
Provides a single database objects and a map of associations associated with this object.

Parameters:
object - the database object
associations - the map of associations associated with the database objects
Method Detail

getObject

public O getObject()
Returns the database object.

Returns:
the database object

getAssociations

public Associations getAssociations()
Returns the associations associated with the database object.

Returns:
the associations associated with the database object

addAssociation

public <T> void addAssociation(AssociationID<T> associationID,
                               T association)
Adds the given association with the specified association ID.

Parameters:
associationID - the association ID
association - the association to be added

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
Returns:
a string representation of the object.

Release 0.1 (2008-07-10_1838)