Ignore:
Timestamp:
04/29/13 16:43:17 (12 years ago)
Author:
pharms
Message:
  • remove a find bugs warning
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  
    8181public class IterationComparisonRule implements TaskComparisonRule { 
    8282     
    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 able 
    89      * to perform comparisons of the children of provided tasks 
    90      * </p> 
    91      *  
    92      * @param ruleManager the rule manager for comparing tasks 
    93      */ 
    94     IterationComparisonRule(TaskEqualityRuleManager ruleManager) { 
    95         super(); 
    96         mRuleManager = ruleManager; 
    97     } 
    98  
    9983    /* (non-Javadoc) 
    10084     * @see NodeComparisonRule#isApplicable(ITask, ITask) 
     
    319303    { 
    320304        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        { 
    324310            return requiredEqualityLevel; 
    325311        } 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SelectionComparisonRule.java

    r1154 r1190  
    3737 */ 
    3838public 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 able 
    46      * to perform comparisons of the children of provided tasks 
    47      * </p> 
    48      *  
    49      * @param ruleManager the rule manager for comparing tasks 
    50      */ 
    51     SelectionComparisonRule(TaskEqualityRuleManager ruleManager) { 
    52         super(); 
    53         mRuleManager = ruleManager; 
    54     } 
    5539 
    5640    /* (non-Javadoc) 
     
    263247    { 
    264248        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        { 
    268254            return requiredEqualityLevel; 
    269255        } 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SequenceComparisonRule.java

    r1154 r1190  
    3232 */ 
    3333public 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 able 
    41      * to perform comparisons of the children of provided tasks 
    42      * </p> 
    43      *  
    44      * @param ruleManager the rule manager for comparing tasks 
    45      */ 
    46     SequenceComparisonRule(TaskEqualityRuleManager ruleManager) { 
    47         super(); 
    48         mRuleManager = ruleManager; 
    49     } 
    5034 
    5135    /* (non-Javadoc) 
     
    154138    { 
    155139        if (requiredEqualityLevel == null) { 
    156             return mRuleManager.compare(child1, child2); 
     140            return TaskEqualityRuleManager.getInstance().compare(child1, child2); 
    157141        } 
    158         else if (mRuleManager.areAtLeastEqual(child1, child2, requiredEqualityLevel)) { 
     142        else if (TaskEqualityRuleManager.getInstance().areAtLeastEqual 
     143                    (child1, child2, requiredEqualityLevel)) 
     144        { 
    159145            return requiredEqualityLevel; 
    160146        } 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRule.java

    r1154 r1190  
    3232public class TaskAndIterationComparisonRule implements TaskComparisonRule { 
    3333     
    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 able 
    40      * to perform comparisons of the children of provided tasks 
    41      * </p> 
    42      *  
    43      * @param ruleManager the rule manager for comparing tasks 
    44      */ 
    45     TaskAndIterationComparisonRule(TaskEqualityRuleManager ruleManager) { 
    46         super(); 
    47         mRuleManager = ruleManager; 
    48     } 
    49  
    5034    /* (non-Javadoc) 
    5135     * @see NodeComparisonRule#isApplicable(ITask, ITask) 
     
    172156    { 
    173157        if (requiredEqualityLevel == null) { 
    174             return mRuleManager.compare(child1, child2); 
     158            return TaskEqualityRuleManager.getInstance().compare(child1, child2); 
    175159        } 
    176         else if (mRuleManager.areAtLeastEqual(child1, child2, requiredEqualityLevel)) { 
     160        else if (TaskEqualityRuleManager.getInstance().areAtLeastEqual 
     161                     (child1, child2, requiredEqualityLevel)) 
     162        { 
    177163            return requiredEqualityLevel; 
    178164        } 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndSelectionComparisonRule.java

    r1154 r1190  
    3333public class TaskAndSelectionComparisonRule implements TaskComparisonRule { 
    3434     
    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 able 
    41      * to perform comparisons of the children of provided tasks 
    42      * </p> 
    43      *  
    44      * @param ruleManager the rule manager for comparing tasks 
    45      */ 
    46     TaskAndSelectionComparisonRule(TaskEqualityRuleManager ruleManager) { 
    47         super(); 
    48         mRuleManager = ruleManager; 
    49     } 
    50  
    5135    /* (non-Javadoc) 
    5236     * @see NodeComparisonRule#isApplicable(ITask, ITask) 
     
    196180    { 
    197181        if (requiredEqualityLevel == null) { 
    198             return mRuleManager.compare(child1, child2); 
     182            return TaskEqualityRuleManager.getInstance().compare(child1, child2); 
    199183        } 
    200         else if (mRuleManager.areAtLeastEqual(child1, child2, requiredEqualityLevel)) { 
     184        else if (TaskEqualityRuleManager.getInstance().areAtLeastEqual 
     185                     (child1, child2, requiredEqualityLevel)) 
     186        { 
    201187            return requiredEqualityLevel; 
    202188        } 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskEqualityRuleManager.java

    r1189 r1190  
    5757        mRuleIndex.add(new GUIEventTaskComparisonRule()); 
    5858        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()); 
    6464    } 
    6565 
Note: See TracChangeset for help on using the changeset viewer.