de.lmu.ifi.dbs.elki.result
Class ResultHierarchy

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.datastructures.hierarchy.HierarchyHashmapList<Result>
      extended by de.lmu.ifi.dbs.elki.result.ResultHierarchy
All Implemented Interfaces:
Hierarchy<Result>, ModifiableHierarchy<Result>

public class ResultHierarchy
extends HierarchyHashmapList<Result>

Class to store a hierarchy of result objects.


Field Summary
private  EventListenerList listenerList
          Holds the listener.
private static Logging logger
          Logger
 
Constructor Summary
ResultHierarchy()
          Constructor.
 
Method Summary
 void add(Result parent, Result child)
          Add a parent-child relationship.
 void addResultListener(ResultListener listener)
          Register a result listener.
private  void fireResultAdded(Result child, Result parent)
          Informs all registered ResultListener that a new result was added.
private  void fireResultChanged(Result current)
          Informs all registered ResultListener that a result has changed.
private  void fireResultRemoved(Result child, Result parent)
          Informs all registered ResultListener that a new result has been removed.
 void put(Result obj, List<Result> parents, List<Result> children)
          Put an object along with parent and child lists.
 void remove(Result parent, Result child)
          Remove a parent-child relationship.
 void removeResultListener(ResultListener listener)
          Remove a result listener.
 void resultChanged(Result res)
          Signal that a result has changed (public API)
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.datastructures.hierarchy.HierarchyHashmapList
getChildren, getParents, iterAncestors, iterDescendants, numChildren, numParents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final Logging logger
Logger


listenerList

private EventListenerList listenerList
Holds the listener.

Constructor Detail

ResultHierarchy

public ResultHierarchy()
Constructor.

Method Detail

add

public void add(Result parent,
                Result child)
Description copied from interface: ModifiableHierarchy
Add a parent-child relationship.

Specified by:
add in interface ModifiableHierarchy<Result>
Overrides:
add in class HierarchyHashmapList<Result>
Parameters:
parent - Parent
child - Child

remove

public void remove(Result parent,
                   Result child)
Description copied from interface: ModifiableHierarchy
Remove a parent-child relationship.

Specified by:
remove in interface ModifiableHierarchy<Result>
Overrides:
remove in class HierarchyHashmapList<Result>
Parameters:
parent - Parent
child - Child

put

public void put(Result obj,
                List<Result> parents,
                List<Result> children)
Description copied from class: HierarchyHashmapList
Put an object along with parent and child lists.

Overrides:
put in class HierarchyHashmapList<Result>
Parameters:
obj - Object
parents - Parent list
children - Child list

addResultListener

public void addResultListener(ResultListener listener)
Register a result listener.

Parameters:
listener - Result listener.

removeResultListener

public void removeResultListener(ResultListener listener)
Remove a result listener.

Parameters:
listener - Result listener.

resultChanged

public void resultChanged(Result res)
Signal that a result has changed (public API)

Parameters:
res - Result that has changed.

fireResultAdded

private void fireResultAdded(Result child,
                             Result parent)
Informs all registered ResultListener that a new result was added.

Parameters:
child - New child result added
parent - Parent result that was added to

fireResultChanged

private void fireResultChanged(Result current)
Informs all registered ResultListener that a result has changed.

Parameters:
current - Result that has changed

fireResultRemoved

private void fireResultRemoved(Result child,
                               Result parent)
Informs all registered ResultListener that a new result has been removed.

Parameters:
child - result that has been removed
parent - Parent result that has been removed

Release 0.4.0 (2011-09-20_1324)