Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.database.AssociationMaps

public class AssociationMaps
extends Object

Helper class to facilitate an association mapping from AssociationID to a map from an object id to an associated object.

Author:
Arthur Zimek

Field Summary
private  Map<AssociationID<?>,Map<Integer,Object>> associations
          Holds a mapping from AssociationID to maps for object ids and associated objects.
 
Constructor Summary
AssociationMaps()
          Provides an AssociationMaps object ready to set and get mappings from object ids to associated objects.
 
Method Summary
 boolean containsKey(AssociationID<?> associationID)
          Checks whether this AssociationMaps contains a mapping for a given AssociationID.
<T> Map<Integer,T>
get(AssociationID<T> associationID)
          Provides the mapping from object ids to associated objects for the given AssociationID.
 Set<AssociationID<?>> keySet()
          Provides the set of all association ids pointing to mappings from object ids to objects within this AssociationMaps.
<T> void
put(AssociationID<T> associationID, Map<Integer,T> associationMap)
          Associates a new mapping from object ids to associated objects for a given AssociationID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

associations

private Map<AssociationID<?>,Map<Integer,Object>> associations
Holds a mapping from AssociationID to maps for object ids and associated objects.

Constructor Detail

AssociationMaps

public AssociationMaps()
Provides an AssociationMaps object ready to set and get mappings from object ids to associated objects.

Method Detail

put

public <T> void put(AssociationID<T> associationID,
                    Map<Integer,T> associationMap)
Associates a new mapping from object ids to associated objects for a given AssociationID.

Type Parameters:
T - the type of the AssociationID conforming the type of associated objects
Parameters:
associationID - the AssociationID for the mapping of object id to objects
associationMap - the mapping of object ids to objects

get

public <T> Map<Integer,T> get(AssociationID<T> associationID)
Provides the mapping from object ids to associated objects for the given AssociationID.

Type Parameters:
T - the type of the AssociationID conforming the type of associated objects
Parameters:
associationID - the AssociationID for the mapping of object id to objects
Returns:
the mapping of object ids to objects for the specified AssociationID

keySet

public Set<AssociationID<?>> keySet()
Provides the set of all association ids pointing to mappings from object ids to objects within this AssociationMaps.

Returns:
the set of all association ids pointing to mappings from object ids to objects within this AssociationMaps

containsKey

public boolean containsKey(AssociationID<?> associationID)
Checks whether this AssociationMaps contains a mapping for a given AssociationID.

Parameters:
associationID - the AssociationID to check whether or not it is used as a key already
Returns:
true if this AssociationMaps contains a mapping for the given AssociationID, false otherwise

Release 0.2.1 (2009-07-13_1605)