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 | |
---|
15 | package de.ugoe.cs.autoquest.tasktrees.treeifc; |
---|
16 | |
---|
17 | import java.util.List; |
---|
18 | |
---|
19 | /** |
---|
20 | * <p> |
---|
21 | * A user session represents task executions, i.e. a task instances of a specific user that were |
---|
22 | * executed in a coherent manner. Therefore, they are an ordered list of task instances where |
---|
23 | * the order denotes the order of the task executions. |
---|
24 | * </p> |
---|
25 | * |
---|
26 | * @author Patrick Harms |
---|
27 | */ |
---|
28 | public interface IUserSession extends ITaskInstanceList { |
---|
29 | |
---|
30 | /** |
---|
31 | * <p> |
---|
32 | * returns the list of task instances executed in the represented session. |
---|
33 | * </p> |
---|
34 | * |
---|
35 | * @return as described |
---|
36 | */ |
---|
37 | public List<ITaskInstance> getExecutedTasks(); |
---|
38 | |
---|
39 | /** |
---|
40 | * <p> |
---|
41 | * compares the user session with another one. Two user sessions are only equal, if they |
---|
42 | * contain the same number of task instances and if each task instance at each position is |
---|
43 | * equal to the respective other session. |
---|
44 | * </p> |
---|
45 | * |
---|
46 | * @param userSession the session to compare the session to |
---|
47 | * |
---|
48 | * @return true if both sessions are equal, false else |
---|
49 | */ |
---|
50 | public boolean equals(IUserSession userSession); |
---|
51 | |
---|
52 | /** |
---|
53 | * <p> |
---|
54 | * returns a hash code for the session to be able to store the session in a hash map. |
---|
55 | * </p> |
---|
56 | * |
---|
57 | * @return as described |
---|
58 | */ |
---|
59 | public int hashCode(); |
---|
60 | |
---|
61 | /** |
---|
62 | * <p> |
---|
63 | * clones a user session by creating exact clones of each contained instance in their order |
---|
64 | * </p> |
---|
65 | * |
---|
66 | * @return a clone of the session |
---|
67 | */ |
---|
68 | public IUserSession clone(); |
---|
69 | |
---|
70 | } |
---|