mirror of
https://github.com/RAIRLab/Spectra.git
synced 2024-11-22 00:46:29 -05:00
adding methods to manage the background.
This commit is contained in:
parent
6919c09a4a
commit
b2da460d5c
1 changed files with 25 additions and 4 deletions
|
@ -34,14 +34,35 @@ public class GoalTracker {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void deleteGoal(Goal goal){
|
public synchronized boolean deleteGoal(Goal goal){
|
||||||
|
|
||||||
currentGoals.remove(goal);
|
return currentGoals.remove(goal);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public synchronized boolean addToBackground(Formula formula){
|
||||||
|
|
||||||
public Optional<Plan> adoptGoal(Goal goal) {
|
return background.add(formula);
|
||||||
|
}
|
||||||
|
|
||||||
|
public synchronized boolean addAllToBackground(Set<Formula> formulae){
|
||||||
|
|
||||||
|
return background.addAll(formulae);
|
||||||
|
}
|
||||||
|
|
||||||
|
public synchronized boolean deleteFromBackground(Formula formula){
|
||||||
|
|
||||||
|
return background.remove(formula);
|
||||||
|
}
|
||||||
|
|
||||||
|
public synchronized boolean removeAllFromBackground(Set<Formula> formulae){
|
||||||
|
|
||||||
|
return background.removeAll(formulae);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public synchronized Optional<Plan> adoptGoal(Goal goal) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue