public class ResultHierarchy extends HierarchyHashmapList<Result>
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 |
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)
|
getChildren, getParents, iterAncestors, iterDescendants, numChildren, numParents
private static final Logging LOG
private EventListenerList listenerList
public void add(Result parent, Result child)
ModifiableHierarchy
add
in interface ModifiableHierarchy<Result>
add
in class HierarchyHashmapList<Result>
parent
- Parentchild
- Childpublic void remove(Result parent, Result child)
ModifiableHierarchy
remove
in interface ModifiableHierarchy<Result>
remove
in class HierarchyHashmapList<Result>
parent
- Parentchild
- Childpublic void put(Result obj, List<Result> parents, List<Result> children)
HierarchyHashmapList
put
in class HierarchyHashmapList<Result>
obj
- Objectparents
- Parent listchildren
- Child listpublic 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