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