|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jeops.conflict.AbstractConflictSet
This class provides a skeletal implementation of the ConflictSet
interface to minimize the effort required to implement this interface.
It helps mainly in dealing with the registered listeners for conflict
set events. Its subclasses must invoke the methods
elementAdded
and elementRemoved
wheneved
applicable to make full use of the notification mechanism this skeleton
provides.
Field Summary | |
protected boolean |
debug
Flag indicating whether there is some registered listener. |
protected java.util.Vector |
listeners
The event listeners. |
Constructor Summary | |
AbstractConflictSet()
Class constructor. |
Method Summary | |
void |
addInternalConflictSetListener(InternalConflictSetListener l)
Adds the specified listener to receive events from this conflict set. |
protected void |
elementAdded(ConflictSetElement e)
Callback method, used to indicate that an element has been added to this conflict set. |
protected void |
elementRemoved(ConflictSetElement e)
Callback method, used to indicate that an element has been removed from this conflict set. |
private void |
fireInternalElementAddedEvent(InternalConflictSetEvent e)
Dispatch an internal element added event to all registered listeners. |
private void |
fireInternalElementRemovedEvent(InternalConflictSetEvent e)
Dispatch an internal element removed event to all registered listeners. |
protected void |
removeElementsWith_1D(java.util.Vector fireableRules,
java.lang.Object obj)
Auxiliar method, used to remove the elements that use a given object in its instantiations. |
protected int |
removeElementsWith_2D(java.util.Vector fireableRules,
java.lang.Object obj)
Auxiliar method, used to remove the elements that use a given object in its instantiations. |
void |
removeInternalConflictSetListener(InternalConflictSetListener l)
Removes the specified listener so that it no longer receives events from this conflict set. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.util.Vector listeners
protected boolean debug
Constructor Detail |
public AbstractConflictSet()
Method Detail |
public void addInternalConflictSetListener(InternalConflictSetListener l)
l
- the conflict set listenerprotected void elementAdded(ConflictSetElement e)
element
- the element that has been added to this conflict
set.protected void elementRemoved(ConflictSetElement e)
nextElement
are not considered as been removed.element
- the element that has been removed from this conflict
set.private void fireInternalElementAddedEvent(InternalConflictSetEvent e)
private void fireInternalElementRemovedEvent(InternalConflictSetEvent e)
protected void removeElementsWith_1D(java.util.Vector fireableRules, java.lang.Object obj)
fireableRules
- the Vector that stores the fireable rules.obj
- the given object.protected int removeElementsWith_2D(java.util.Vector fireableRules, java.lang.Object obj)
fireableRules
- the Vector that stores the fireable rules.obj
- the given object.public void removeInternalConflictSetListener(InternalConflictSetListener l)
l
- the conflict set listener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |