source: trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskComparisonRule.java @ 1183

Last change on this file since 1183 was 1146, checked in by pharms, 11 years ago
  • complete refactoring of task tree model with a separation of task models and task instances
  • appropriate adaptation of task tree generation process
  • appropriate adaptation of commands and task tree visualization
  • Property svn:executable set to *
File size: 2.8 KB
RevLine 
[1113]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
[1146]15package de.ugoe.cs.autoquest.tasktrees.taskequality;
[439]16
[1146]17import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
[439]18
19/**
[557]20 * <p>
[1146]21 * A task comparison rule is used by the {@link TaskEqualityRuleManager} to compare tasks with
22 * each other. It provides several methods to be called for a comparison.
[557]23 * </p>
[439]24 *
25 * @version $Revision: $ $Date: 19.02.2012$
26 * @author 2012, last modified by $Author: patrick$
27 */
[1146]28public interface TaskComparisonRule {
[439]29
[557]30    /**
31     * <p>
[1146]32     * checks if the rule is applicable for comparing the two provided tasks
[1125]33     * </p>
34     *
[1146]35     * @param task1 the first task to compare
36     * @param task2 the second task to compare
[1125]37     *
38     * @return true, if the rule is applicable, false else
39     */
[1146]40    public boolean isApplicable(ITask task1, ITask task2);
[1125]41
42    /**
43     * <p>
[1146]44     * checks, if the provided tasks are lexically equal
[1125]45     * </p>
46     *
[1146]47     * @param task1 the first task to compare
48     * @param task2 the second task to compare
[1125]49     *
[1146]50     * @return true, if the tasks are equal, false else
[1125]51     */
[1146]52    public boolean areLexicallyEqual(ITask task1, ITask task2);
[1125]53
54    /**
55     * <p>
[1146]56     * checks, if the provided tasks are syntactically equal
[1125]57     * </p>
58     *
[1146]59     * @param task1 the first task to compare
60     * @param task2 the second task to compare
[1125]61     *
[1146]62     * @return true, if the tasks are equal, false else
[1125]63     */
[1146]64    public boolean areSyntacticallyEqual(ITask task1, ITask task2);
[1125]65
66    /**
67     * <p>
[1146]68     * checks, if the provided tasks are semantically equal
[1125]69     * </p>
70     *
[1146]71     * @param task1 the first task to compare
72     * @param task2 the second task to compare
[1125]73     *
[1146]74     * @return true, if the tasks are equal, false else
[1125]75     */
[1146]76    public boolean areSemanticallyEqual(ITask task1, ITask task2);
[1125]77
78    /**
79     * <p>
[1146]80     * compares two tasks with each other. The result of the method is either a task equality or
[557]81     * null. If it is null, it means, that the rule is not able to correctly compare the two given
[1146]82     * tasks
[557]83     * </p>
84     *
[1146]85     * @param task1 the first task to compare
86     * @param task2 the second task to compare
[557]87     *
88     * @return as described
89     */
[1146]90    public TaskEquality compare(ITask task1, ITask task2);
[557]91
[439]92}
Note: See TracBrowser for help on using the repository browser.