|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.cmu.cs.coral.icf.plan_based.planners.pip.SetChange
Represents a addition/deletion to a set.
Field Summary | |
static int |
add
Code for adding an element to the set. |
private int |
addDel
the type of change made to the set (addition/deletion) |
static int |
del
Code for removing an element from the set |
private java.lang.Object |
elem
the element affected |
private java.util.Set |
set
the set modified |
Constructor Summary | |
private |
SetChange(int add_del,
java.util.Set set,
java.lang.Object elem)
Constructs a set change of the appopriate type. |
Method Summary | |
void |
apply()
Applies the change to the set. |
static SetChange |
makeSetChange(int add_del,
java.util.Set set,
java.lang.Object elem)
Performs the designated operation and returns a set change that can be used to undo the operation. |
void |
undo()
Undoes the change to the set. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final int add
public static final int del
private int addDel
private java.util.Set set
private java.lang.Object elem
Constructor Detail |
private SetChange(int add_del, java.util.Set set, java.lang.Object elem)
add_del
- SetChange.add if the elemented is added to the set,
SetChange.del if the elemented is deleted to the set,set
- the set that is modifiedelem
- the element that is added/removed from the setMethod Detail |
public static SetChange makeSetChange(int add_del, java.util.Set set, java.lang.Object elem)
add_del
- SetChange.add if the elemented is added to the set,
SetChange.del if the elemented is deleted to the set,set
- the set that is modifiedelem
- the element that is added/removed from the setpublic void undo()
public void apply()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |