jeops.conflict
Class DefaultConflictSet
java.lang.Object
|
+--jeops.conflict.AbstractConflictSet
|
+--jeops.conflict.DefaultConflictSet
- Direct Known Subclasses:
- NaturalConflictSet
- public class DefaultConflictSet
- extends AbstractConflictSet
A default conflict set, whose conflict resolution policy is not specified.
In other words, any of the instantiations can be returned.
- Version:
- 0.01 29 Mar 2000
- Author:
- Carlos Figueira Filho (csff@di.ufpe.br)
Method Summary |
void |
flush()
Removes all rules from this conflict set, as well as cleaning any
history that might have been stored. |
java.util.Vector |
getModifiedObjects(java.lang.Object obj)
Returns all objects that were modified in response to a modification
in the given object. |
void |
insertElement(ConflictSetElement element)
Inserts a rule instantiation. |
boolean |
isEmpty()
Checks whether this set has any elements. |
ConflictSetElement |
nextElement()
Returns the next rule to be fired. |
void |
removeElementsWith(java.lang.Object obj)
Remove all elements from this set that uses the given object
in its instantiations. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DefaultConflictSet
public DefaultConflictSet()
- Class constructor.
flush
public void flush()
- Removes all rules from this conflict set, as well as cleaning any
history that might have been stored.
insertElement
public void insertElement(ConflictSetElement element)
- Inserts a rule instantiation.
- Parameters:
element
- a conflict set element that holds the rule index as
well as the objects bound to the rule declarations.
isEmpty
public boolean isEmpty()
- Checks whether this set has any elements.
- Returns:
false
if there is at least one firable rule
in this set; true
otherwise.
nextElement
public ConflictSetElement nextElement()
throws NoMoreElementsException
- Returns the next rule to be fired.
- Returns:
- a conflict set element among those that have been inserted
in this object, according to the policy defined in the
conflict set.
- Throws:
- NoMoreElementsException - if there aren't any more elements
in this conflict set.
removeElementsWith
public void removeElementsWith(java.lang.Object obj)
- Remove all elements from this set that uses the given object
in its instantiations.
- Parameters:
obj
- the given object
getModifiedObjects
public java.util.Vector getModifiedObjects(java.lang.Object obj)
- Returns all objects that were modified in response to a modification
in the given object.
- Parameters:
obj
- the given object- Returns:
- a vector with all objects that must be declared as modified
due to the modification in this one.