public class ResultHierarchy extends HashMapHierarchy<Result>
Hierarchy.Iter<O>
Modifier and Type | Field and Description |
---|---|
private EventListenerList |
listenerList
Holds the listener.
|
private static Logging |
LOG
Logger
|
Constructor and Description |
---|
ResultHierarchy()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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 |
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, iterAll, iterAncestors, iterChildren, iterDescendants, iterParents, numChildren, numParents, remove, removeSubtree, size
private static final Logging LOG
private EventListenerList listenerList
public void add(Result parent, Result child)
ModifiableHierarchy
add
in interface ModifiableHierarchy<Result>
add
in class HashMapHierarchy<Result>
parent
- Parentchild
- Childpublic void remove(Result parent, Result child)
ModifiableHierarchy
remove
in interface ModifiableHierarchy<Result>
remove
in class HashMapHierarchy<Result>
parent
- Parentchild
- Childpublic 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 removed