Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.result
Class AnnotationFromHashMap<T>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.result.AnnotationFromHashMap<T>
Type Parameters:
T - Data type to store.
All Implemented Interfaces:
AnnotationResult<T>, Result

public class AnnotationFromHashMap<T>
extends Object
implements AnnotationResult<T>

Annotations backed by hashmaps.

Author:
Erich Schubert

Field Summary
private  AssociationID<T> assoc
          Store Association ID
private  HashMap<Integer,T> map
          Store the hashmap for results.
 
Constructor Summary
AnnotationFromHashMap(AssociationID<T> assoc, HashMap<Integer,T> map)
          Constructor
 
Method Summary
 AssociationID<T> getAssociationID()
          Return the association ID of this result.
 String getName()
          Get a user-understandable name for this result.
 T getValueFor(Integer objID)
          Get associated value for an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

private HashMap<Integer,T> map
Store the hashmap for results.


assoc

private AssociationID<T> assoc
Store Association ID

Constructor Detail

AnnotationFromHashMap

public AnnotationFromHashMap(AssociationID<T> assoc,
                             HashMap<Integer,T> map)
Constructor

Parameters:
assoc - Association
map - Map
Method Detail

getAssociationID

public AssociationID<T> getAssociationID()
Description copied from interface: AnnotationResult
Return the association ID of this result.

Specified by:
getAssociationID in interface AnnotationResult<T>
Returns:
Association ID

getValueFor

public T getValueFor(Integer objID)
Description copied from interface: AnnotationResult
Get associated value for an object.

Specified by:
getValueFor in interface AnnotationResult<T>
Parameters:
objID - Object ID
Returns:
Associated value

getName

public String getName()
Description copied from interface: Result
Get a user-understandable name for this result. Defaults may be returned such as "list" for a list result.

Specified by:
getName in interface Result
Returns:
result name

Release 0.3 (2010-03-31_1612)