Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.database
Class Associations

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.database.Associations
All Implemented Interfaces:
Loggable

public class Associations
extends AbstractLoggable

A helper class to facilitate setting of global associations in a database.

Author:
Arthur Zimek

Field Summary
private  Map<AssociationID,Object> associations
          Holds the objects associated under given association ids.
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug
 
Constructor Summary
Associations()
          Provides an Associations object ready to set and get Objects for association.
 
Method Summary
<T> T
get(AssociationID<T> associationID)
          Retrieves the object associated under the given association id.
 Set<AssociationID> keySet()
          Provides the set of all association ids pointing to objects within this Associations.
<T> void
put(AssociationID<T> associationID, T associationObject)
          Sets the specified object under the given AssociationID.
 void putAll(Associations associations)
          Adds all pairs of association ids and objects currently set in the given Associations object to this Associations object.
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

associations

private Map<AssociationID,Object> associations
Holds the objects associated under given association ids.

Constructor Detail

Associations

public Associations()
Provides an Associations object ready to set and get Objects for association.

Method Detail

put

public <T> void put(AssociationID<T> associationID,
                    T associationObject)
Sets the specified object under the given AssociationID.

Type Parameters:
T - the type of the object to be associated and the AssociationID
Parameters:
associationID - the AssociationID to point to the object
associationObject - the object to be associated

get

public <T> T get(AssociationID<T> associationID)
Retrieves the object associated under the given association id.

Type Parameters:
T - the type of the object to retrieve conforms to the type of the association id
Parameters:
associationID - the association id pointing to the object to retrieve
Returns:
the object associated under the given association id

keySet

public Set<AssociationID> keySet()
Provides the set of all association ids pointing to objects within this Associations.

Returns:
the set of all association ids pointing to objects within this Associations

putAll

public void putAll(Associations associations)
Adds all pairs of association ids and objects currently set in the given Associations object to this Associations object.

Parameters:
associations - an Associations object to copy the contained associations from

Release 0.1 (2008-07-10_1838)