source: trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITask.java @ 1167

Last change on this file since 1167 was 1167, checked in by pharms, 11 years ago
  • improved java doc
File size: 2.7 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.treeifc;
16
17import java.io.Serializable;
18
19/**
20 * <p>
21 * A task represents a model for events that occur if the user interacts with a software for
22 * achieving a specific goal. A task can be a single event or a complex structure of events
23 * and temporal relationships defining the event order. Tasks may especially refer to other tasks
24 * to create task structures similar to trees. These structures fully define in which ways the
25 * events that form the task can occur.
26 * </p>
27 *
28 * @author Patrick Harms
29 */
30public interface ITask extends Cloneable, Serializable {
31
32    /**
33     * <p>
34     * every task is assigned a unique id which is returned by this method. The id is unique for
35     * the current runtime.
36     * </p>
37     *
38     * @return as described
39     */
40    public int getId();
41
42    /**
43     * <p>
44     * returns a human readable description for task.
45     * </p>
46     *
47     * @return as described
48     */
49    public String getDescription();
50
51    /**
52     * <p>
53     * checks whether this task is equal to another one. Task equality is only given, if two
54     * tasks have the same id. This means, that this method must only return true if the other
55     * task is either the same object or a clone of it.
56     * </p>
57     *
58     * @return as described
59     */
60    public boolean equals(ITask task);
61
62    /**
63     * <p>
64     * returns a hash code for the task, which is usually the id returned by {@link #getId()}.
65     * </p>
66     *
67     * @return as described
68     */
69    public int hashCode();
70
71    /**
72     * <p>
73     * returns an exact copy of this task. The clone has the same id. If the task has
74     * children, they are cloned as well. A call on the method {@link #equals(ITask)} with the
75     * result of this method must return true.
76     * </p>
77     *
78     * @return as described
79     */
80    public ITask clone();
81   
82    /**
83     * <p>
84     * implements the visitor pattern to be able to process tasks and their children.
85     * </p>
86     *
87     * @param visitor the visitor used to process the task
88     */
89    public void accept(ITaskVisitor visitor);
90   
91}
Note: See TracBrowser for help on using the repository browser.