Changeset 1146 for trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskIdentityRule.java
- Timestamp:
- 04/04/13 16:06:07 (11 years ago)
- Location:
- trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality
- Files:
-
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskIdentityRule.java
r1125 r1146 13 13 // limitations under the License. 14 14 15 package de.ugoe.cs.autoquest.tasktrees. nodeequality;15 package de.ugoe.cs.autoquest.tasktrees.taskequality; 16 16 17 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask TreeNode;17 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 18 18 19 19 /** 20 20 * <p> 21 * This comparison rule returns <code> NodeEquality.IDENTICAL</code> if the comparison of the two22 * task tree nodes using the <code>==</code> operator or the <code>equals</code> method return true.23 * Else it returns null to denote, that it can not compare the nodes.21 * This comparison rule returns <code>TaskEquality.IDENTICAL</code> if the comparison of the two 22 * tasks using the <code>==</code> operator or the <code>equals</code> method return true. 23 * Else it returns null to denote, that it can not compare the tasks. 24 24 * </p> 25 25 * … … 27 27 * @author 2012, last modified by $Author: patrick$ 28 28 */ 29 public class NodeIdentityRule implements NodeComparisonRule {29 public class TaskIdentityRule implements TaskComparisonRule { 30 30 31 31 /* (non-Javadoc) 32 * @see NodeComparisonRule#isApplicable(ITask TreeNode, ITaskTreeNode)32 * @see NodeComparisonRule#isApplicable(ITask, ITask) 33 33 */ 34 34 @Override 35 public boolean isApplicable(ITask TreeNode node1, ITaskTreeNode node2) {36 return ( node1 == node2);35 public boolean isApplicable(ITask task1, ITask task2) { 36 return (task1 == task2); 37 37 } 38 38 39 39 /* (non-Javadoc) 40 * @see NodeComparisonRule#areLexicallyEqual(ITask TreeNode, ITaskTreeNode)40 * @see NodeComparisonRule#areLexicallyEqual(ITask, ITask) 41 41 */ 42 42 @Override 43 public boolean areLexicallyEqual(ITask TreeNode node1, ITaskTreeNode node2) {44 return ( node1 == node2);43 public boolean areLexicallyEqual(ITask task1, ITask task2) { 44 return (task1 == task2); 45 45 } 46 46 47 47 /* (non-Javadoc) 48 * @see NodeComparisonRule#areSyntacticallyEqual(ITask TreeNode, ITaskTreeNode)48 * @see NodeComparisonRule#areSyntacticallyEqual(ITask, ITask) 49 49 */ 50 50 @Override 51 public boolean areSyntacticallyEqual(ITask TreeNode node1, ITaskTreeNode node2) {52 return ( node1 == node2);51 public boolean areSyntacticallyEqual(ITask task1, ITask task2) { 52 return (task1 == task2); 53 53 } 54 54 55 55 /* (non-Javadoc) 56 * @see NodeComparisonRule#areSemanticallyEqual(ITask TreeNode, ITaskTreeNode)56 * @see NodeComparisonRule#areSemanticallyEqual(ITask, ITask) 57 57 */ 58 58 @Override 59 public boolean areSemanticallyEqual(ITask TreeNode node1, ITaskTreeNode node2) {60 return ( node1 == node2);59 public boolean areSemanticallyEqual(ITask task1, ITask task2) { 60 return (task1 == task2); 61 61 } 62 62 63 63 /* (non-Javadoc) 64 * @see NodeComparisonRule#compare(ITask TreeNode, ITaskTreeNode)64 * @see NodeComparisonRule#compare(ITask, ITask) 65 65 */ 66 66 @Override 67 public NodeEquality compare(ITaskTreeNode node1, ITaskTreeNode node2) {68 if (isApplicable( node1, node2)) {69 return NodeEquality.IDENTICAL;67 public TaskEquality compare(ITask task1, ITask task2) { 68 if (isApplicable(task1, task2)) { 69 return TaskEquality.IDENTICAL; 70 70 } 71 71 else {
Note: See TracChangeset
for help on using the changeset viewer.