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.database.Associations

public class Associations
extends Object

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

Author:
Arthur Zimek

Field Summary
private  AnyMap<AssociationID<?>> associations
          Map to store the actual data.
 
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.
 void putUnchecked(AssociationID<?> associationID, Object associationObject)
          Sets the specified object under the given AssociationID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

associations

private AnyMap<AssociationID<?>> associations
Map to store the actual data.

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

putUnchecked

public void putUnchecked(AssociationID<?> associationID,
                         Object associationObject)
Sets the specified object under the given AssociationID. Untyped version.

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.2 (2009-07-06_1820)