source: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskComparisonRule.java @ 1733

Last change on this file since 1733 was 1733, checked in by rkrimmel, 10 years ago

Used Eclipse code cleanup

  • Property svn:executable set to *
File size: 4.9 KB
Line 
1//   Copyright 2012 Georg-August-Universität Göttingen, Germany
2//
3//   Licensed under the Apache License, Version 2.0 (the "License");
4//   you may not use this file except in compliance with the License.
5//   You may obtain a copy of the License at
6//
7//       http://www.apache.org/licenses/LICENSE-2.0
8//
9//   Unless required by applicable law or agreed to in writing, software
10//   distributed under the License is distributed on an "AS IS" BASIS,
11//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//   See the License for the specific language governing permissions and
13//   limitations under the License.
14
15package de.ugoe.cs.autoquest.tasktrees.taskequality;
16
17import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
18import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
19
20/**
21 * <p>
22 * A task comparison rule is used by the {@link TaskEqualityRuleManager} to
23 * compare tasks and task instances with each other. It provides several methods
24 * to be called for a comparison.
25 * </p>
26 *
27 * @version $Revision: $ $Date: 19.02.2012$
28 * @author 2012, last modified by $Author: patrick$
29 */
30public interface TaskComparisonRule {
31
32        /**
33         * <p>
34         * checks, if the provided tasks are lexically equal
35         * </p>
36         *
37         * @param task1
38         *            the first task to compare
39         * @param task2
40         *            the second task to compare
41         *
42         * @return true, if the tasks are equal, false else
43         */
44        public boolean areLexicallyEqual(ITask task1, ITask task2);
45
46        /**
47         * <p>
48         * checks, if the provided task instances are lexically equal
49         * </p>
50         *
51         * @param instance1
52         *            the first task instance to compare
53         * @param instance2
54         *            the second task instance to compare
55         *
56         * @return true, if the tasks are equal, false else
57         */
58        public boolean areLexicallyEqual(ITaskInstance instance1,
59                        ITaskInstance instance2);
60
61        /**
62         * <p>
63         * checks, if the provided tasks are semantically equal
64         * </p>
65         *
66         * @param task1
67         *            the first task to compare
68         * @param task2
69         *            the second task to compare
70         *
71         * @return true, if the tasks are equal, false else
72         */
73        public boolean areSemanticallyEqual(ITask task1, ITask task2);
74
75        /**
76         * <p>
77         * checks, if the provided task instances are semantically equal
78         * </p>
79         *
80         * @param instance1
81         *            the first task instance to compare
82         * @param instance2
83         *            the second task instance to compare
84         *
85         * @return true, if the tasks are equal, false else
86         */
87        public boolean areSemanticallyEqual(ITaskInstance instance1,
88                        ITaskInstance instance2);
89
90        /**
91         * <p>
92         * checks, if the provided tasks are syntactically equal
93         * </p>
94         *
95         * @param task1
96         *            the first task to compare
97         * @param task2
98         *            the second task to compare
99         *
100         * @return true, if the tasks are equal, false else
101         */
102        public boolean areSyntacticallyEqual(ITask task1, ITask task2);
103
104        /**
105         * <p>
106         * checks, if the provided task instances are syntactically equal
107         * </p>
108         *
109         * @param instance1
110         *            the first task instance to compare
111         * @param instance2
112         *            the second task instance to compare
113         *
114         * @return true, if the tasks are equal, false else
115         */
116        public boolean areSyntacticallyEqual(ITaskInstance instance1,
117                        ITaskInstance instance2);
118
119        /**
120         * <p>
121         * compares two tasks with each other. The result of the method is either a
122         * task equality or null. If it is null, it means, that the rule is not able
123         * to correctly compare the two given tasks
124         * </p>
125         *
126         * @param task1
127         *            the first task to compare
128         * @param task2
129         *            the second task to compare
130         *
131         * @return as described
132         */
133        public TaskEquality compare(ITask task1, ITask task2);
134
135        /**
136         * <p>
137         * compares two task instances with each other. The result of the method is
138         * either a task instance equality or null. If it is null, it means, that
139         * the rule is not able to correctly compare the two given task instances
140         * </p>
141         *
142         * @param instance1
143         *            the first task instance to compare
144         * @param instance2
145         *            the second task instance to compare
146         *
147         * @return as described
148         */
149        public TaskEquality compare(ITaskInstance instance1, ITaskInstance instance2);
150
151        /**
152         * <p>
153         * checks if the rule is applicable for comparing the two provided tasks
154         * </p>
155         *
156         * @param task1
157         *            the first task to compare
158         * @param task2
159         *            the second task to compare
160         *
161         * @return true, if the rule is applicable, false else
162         */
163        public boolean isApplicable(ITask task1, ITask task2);
164
165        /**
166         * <p>
167         * checks if the rule is applicable for comparing the two provided task
168         * instances
169         * </p>
170         *
171         * @param instance1
172         *            the first task instance to compare
173         * @param instance2
174         *            the second task instance to compare
175         *
176         * @return true, if the rule is applicable, false else
177         */
178        public boolean isApplicable(ITaskInstance instance1, ITaskInstance instance2);
179
180}
Note: See TracBrowser for help on using the repository browser.