public class ResultHierarchy extends HashMapHierarchy<Result>
HashMapHierarchy.Rec<O>
Hierarchy.Iter<O>
Modifier and Type | Field and Description |
---|---|
private ArrayList<ResultListener> |
listenerList
Holds the listener.
|
private static Logging |
LOG
Logger
|
Constructor and Description |
---|
ResultHierarchy()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
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. |
boolean |
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)
|
add, contains, emptyIterator, iterAll, iterAncestors, iterAncestorsSelf, iterChildren, iterChildrenReverse, iterDescendants, iterDescendantsSelf, iterParents, iterParentsReverse, numChildren, numParents, remove, removeSubtree, size
private static final Logging LOG
private ArrayList<ResultListener> listenerList
public boolean add(Result parent, Result child)
ModifiableHierarchy
add
in interface ModifiableHierarchy<Result>
add
in class HashMapHierarchy<Result>
parent
- Parentchild
- Childtrue
if changedpublic boolean remove(Result parent, Result child)
ModifiableHierarchy
remove
in interface ModifiableHierarchy<Result>
remove
in class HashMapHierarchy<Result>
parent
- Parentchild
- Childtrue
if changedpublic void addResultListener(ResultListener listener)
listener
- Result listener.public void removeResultListener(ResultListener listener)
listener
- Result listener.public void resultChanged(Result res)
res
- Result that has changed.private void fireResultAdded(Result child, Result parent)
ResultListener
that a new result was added.child
- New child result addedparent
- Parent result that was added toprivate void fireResultChanged(Result current)
ResultListener
that a result has changed.current
- Result that has changedprivate void fireResultRemoved(Result child, Result parent)
ResultListener
that a new result has been
removed.child
- result that has been removedparent
- Parent result that has been removedCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.