Changeset 1190 for trunk/autoquest-core-tasktrees/src
- Timestamp:
- 04/29/13 16:43:17 (12 years ago)
- Location:
- trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/IterationComparisonRule.java
r1154 r1190 81 81 public class IterationComparisonRule implements TaskComparisonRule { 82 82 83 /** the rule manager for internally comparing tasks */84 private TaskEqualityRuleManager mRuleManager;85 86 /**87 * <p>88 * simple constructor to provide the rule with the task equality rule manager to be able89 * to perform comparisons of the children of provided tasks90 * </p>91 *92 * @param ruleManager the rule manager for comparing tasks93 */94 IterationComparisonRule(TaskEqualityRuleManager ruleManager) {95 super();96 mRuleManager = ruleManager;97 }98 99 83 /* (non-Javadoc) 100 84 * @see NodeComparisonRule#isApplicable(ITask, ITask) … … 319 303 { 320 304 if (requiredEqualityLevel == null) { 321 return mRuleManager.compare(child1, child2); 322 } 323 else if (mRuleManager.areAtLeastEqual(child1, child2, requiredEqualityLevel)) { 305 return TaskEqualityRuleManager.getInstance().compare(child1, child2); 306 } 307 else if (TaskEqualityRuleManager.getInstance().areAtLeastEqual 308 (child1, child2, requiredEqualityLevel)) 309 { 324 310 return requiredEqualityLevel; 325 311 } -
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SelectionComparisonRule.java
r1154 r1190 37 37 */ 38 38 public class SelectionComparisonRule implements TaskComparisonRule { 39 40 /** the rule manager for internally comparing tasks */41 private TaskEqualityRuleManager mRuleManager;42 43 /**44 * <p>45 * simple constructor to provide the rule with the task equality rule manager to be able46 * to perform comparisons of the children of provided tasks47 * </p>48 *49 * @param ruleManager the rule manager for comparing tasks50 */51 SelectionComparisonRule(TaskEqualityRuleManager ruleManager) {52 super();53 mRuleManager = ruleManager;54 }55 39 56 40 /* (non-Javadoc) … … 263 247 { 264 248 if (requiredEqualityLevel == null) { 265 return mRuleManager.compare(child1, child2); 266 } 267 else if (mRuleManager.areAtLeastEqual(child1, child2, requiredEqualityLevel)) { 249 return TaskEqualityRuleManager.getInstance().compare(child1, child2); 250 } 251 else if (TaskEqualityRuleManager.getInstance().areAtLeastEqual 252 (child1, child2, requiredEqualityLevel)) 253 { 268 254 return requiredEqualityLevel; 269 255 } -
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SequenceComparisonRule.java
r1154 r1190 32 32 */ 33 33 public class SequenceComparisonRule implements TaskComparisonRule { 34 35 /** the rule manager for internally comparing tasks */36 private TaskEqualityRuleManager mRuleManager;37 38 /**39 * <p>40 * simple constructor to provide the rule with the task equality rule manager to be able41 * to perform comparisons of the children of provided tasks42 * </p>43 *44 * @param ruleManager the rule manager for comparing tasks45 */46 SequenceComparisonRule(TaskEqualityRuleManager ruleManager) {47 super();48 mRuleManager = ruleManager;49 }50 34 51 35 /* (non-Javadoc) … … 154 138 { 155 139 if (requiredEqualityLevel == null) { 156 return mRuleManager.compare(child1, child2);140 return TaskEqualityRuleManager.getInstance().compare(child1, child2); 157 141 } 158 else if (mRuleManager.areAtLeastEqual(child1, child2, requiredEqualityLevel)) { 142 else if (TaskEqualityRuleManager.getInstance().areAtLeastEqual 143 (child1, child2, requiredEqualityLevel)) 144 { 159 145 return requiredEqualityLevel; 160 146 } -
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRule.java
r1154 r1190 32 32 public class TaskAndIterationComparisonRule implements TaskComparisonRule { 33 33 34 /** the rule manager for internally comparing tasks */35 private TaskEqualityRuleManager mRuleManager;36 37 /**38 * <p>39 * simple constructor to provide the rule with the task equality rule manager to be able40 * to perform comparisons of the children of provided tasks41 * </p>42 *43 * @param ruleManager the rule manager for comparing tasks44 */45 TaskAndIterationComparisonRule(TaskEqualityRuleManager ruleManager) {46 super();47 mRuleManager = ruleManager;48 }49 50 34 /* (non-Javadoc) 51 35 * @see NodeComparisonRule#isApplicable(ITask, ITask) … … 172 156 { 173 157 if (requiredEqualityLevel == null) { 174 return mRuleManager.compare(child1, child2);158 return TaskEqualityRuleManager.getInstance().compare(child1, child2); 175 159 } 176 else if (mRuleManager.areAtLeastEqual(child1, child2, requiredEqualityLevel)) { 160 else if (TaskEqualityRuleManager.getInstance().areAtLeastEqual 161 (child1, child2, requiredEqualityLevel)) 162 { 177 163 return requiredEqualityLevel; 178 164 } -
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndSelectionComparisonRule.java
r1154 r1190 33 33 public class TaskAndSelectionComparisonRule implements TaskComparisonRule { 34 34 35 /** the rule manager for internally comparing tasks */36 private TaskEqualityRuleManager mRuleManager;37 38 /**39 * <p>40 * simple constructor to provide the rule with the task equality rule manager to be able41 * to perform comparisons of the children of provided tasks42 * </p>43 *44 * @param ruleManager the rule manager for comparing tasks45 */46 TaskAndSelectionComparisonRule(TaskEqualityRuleManager ruleManager) {47 super();48 mRuleManager = ruleManager;49 }50 51 35 /* (non-Javadoc) 52 36 * @see NodeComparisonRule#isApplicable(ITask, ITask) … … 196 180 { 197 181 if (requiredEqualityLevel == null) { 198 return mRuleManager.compare(child1, child2);182 return TaskEqualityRuleManager.getInstance().compare(child1, child2); 199 183 } 200 else if (mRuleManager.areAtLeastEqual(child1, child2, requiredEqualityLevel)) { 184 else if (TaskEqualityRuleManager.getInstance().areAtLeastEqual 185 (child1, child2, requiredEqualityLevel)) 186 { 201 187 return requiredEqualityLevel; 202 188 } -
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskEqualityRuleManager.java
r1189 r1190 57 57 mRuleIndex.add(new GUIEventTaskComparisonRule()); 58 58 mRuleIndex.add(new EventTaskComparisonRule()); 59 mRuleIndex.add(new IterationComparisonRule( this));60 mRuleIndex.add(new SequenceComparisonRule( this));61 mRuleIndex.add(new SelectionComparisonRule( this));62 mRuleIndex.add(new TaskAndIterationComparisonRule( this));63 mRuleIndex.add(new TaskAndSelectionComparisonRule( this));59 mRuleIndex.add(new IterationComparisonRule()); 60 mRuleIndex.add(new SequenceComparisonRule()); 61 mRuleIndex.add(new SelectionComparisonRule()); 62 mRuleIndex.add(new TaskAndIterationComparisonRule()); 63 mRuleIndex.add(new TaskAndSelectionComparisonRule()); 64 64 } 65 65
Note: See TracChangeset
for help on using the changeset viewer.