Class RevisionCompareModel
java.lang.Object
org.tweetyproject.beliefdynamics.gui.RevisionCompareModel
The data-model used to compare two different revision approaches. Two approaches
can be selected using a list of approaches. The data-model also contains an ordered list
of belief bases which define the ordering of the revision process. Observers are notified using
the PropertyChangeListener.
- Author:
- Tim Janus
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addBeliefbase
(Collection<? extends Formula> beliefBase) Adds a belief base to the end of the ordered list of belief bases.void
addListener
(PropertyChangeListener listener) Adds a property change listenervoid
addOperator
(BaseRevisionOperator<?> op) Adds the given revision operator to the set of selectable revision methods.void
moveBeliefbase
(Collection<?> beliefBase, int dir) Moves the given belief base in the given direction.void
removeBeliefbase
(Collection<?> beliefBase) Removes a belief base from the ordered list of belief bases.void
removeListener
(PropertyChangeListener listener) Removes a property change listenervoid
Removes the given revision operator from the set of selectable revision methods.void
setLeftIterative
(boolean b) switches the flag indicating if the left method shall use iterative algorithmsvoid
setLeftOperator
(BaseRevisionOperator<?> left) Select the left revision method.void
setRightIterative
(boolean b) switches the flag indicating if the right method shall use iterative algorithmsvoid
setRightOperator
(BaseRevisionOperator<?> right) Select the right revision method.
-
Constructor Details
-
RevisionCompareModel
public RevisionCompareModel()
-
-
Method Details
-
addListener
Adds a property change listener- Parameters:
listener
- Reference to the listener
-
removeListener
Removes a property change listener- Parameters:
listener
- Reference to the listener
-
setLeftOperator
Select the left revision method.- Parameters:
left
- The revision method as an operator reference
-
setRightOperator
Select the right revision method.- Parameters:
right
- The revision method as an operator reference
-
addBeliefbase
Adds a belief base to the end of the ordered list of belief bases.- Parameters:
beliefBase
- Reference to the new belief base
-
removeBeliefbase
Removes a belief base from the ordered list of belief bases.- Parameters:
beliefBase
- Reference to the belief base which shall be removed.
-
moveBeliefbase
Moves the given belief base in the given direction.- Parameters:
beliefBase
- A belief base which is already in the ordered list of belief basesdir
- Either -1 if the belief base shall move one index to the front of the list or 1 if the belief base shall move one unit index to the end of the list.
-
addOperator
Adds the given revision operator to the set of selectable revision methods.- Parameters:
op
- Reference to the operator, if the operator is in the set nothing happens
-
removeOperator
Removes the given revision operator from the set of selectable revision methods.- Parameters:
op
- Reference to the operator which is removed if it is member of the set of revision methods.
-
setLeftIterative
public void setLeftIterative(boolean b) switches the flag indicating if the left method shall use iterative algorithms- Parameters:
b
- true means iterative, false means in one step.
-
setRightIterative
public void setRightIterative(boolean b) switches the flag indicating if the right method shall use iterative algorithms- Parameters:
b
- true means iterative, false means in one step.
-