[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 | |
---|
[922] | 15 | package de.ugoe.cs.autoquest.tasktrees.treeifc;
|
---|
[1146] | 16 | |
---|
[1294] | 17 | import java.io.Serializable; |
---|
[439] | 18 |
|
---|
| 19 | /**
|
---|
[1177] | 20 | * <p> |
---|
| 21 | * a task instance represents the execution of a specific task within a user session. A task |
---|
[1294] | 22 | * instance is always related to the task that was executed. |
---|
[1177] | 23 | * </p> |
---|
| 24 | * |
---|
| 25 | * @author Patrick Harms |
---|
[439] | 26 | */
|
---|
[1294] | 27 | public interface ITaskInstance extends Serializable, Cloneable {
|
---|
[439] | 28 |
|
---|
[557] | 29 | /**
|
---|
[1177] | 30 | * <p> |
---|
| 31 | * returns the task related to the instance. |
---|
| 32 | * </p> |
---|
| 33 | * |
---|
| 34 | * @return as described
|
---|
[557] | 35 | */
|
---|
[1146] | 36 | public ITask getTask();
|
---|
[439] | 37 |
|
---|
[557] | 38 | /**
|
---|
[1177] | 39 | * <p> |
---|
| 40 | * compares an instance to another one. Returns true if both instances are the same, i.e. not |
---|
| 41 | * only the related task is equal but also all children and further characteristics of the |
---|
| 42 | * task instance |
---|
| 43 | * </p> |
---|
| 44 | * |
---|
| 45 | * @param taskInstance the instance to compare to |
---|
| 46 | * |
---|
| 47 | * @return as described
|
---|
[557] | 48 | */
|
---|
[1146] | 49 | public boolean equals(ITaskInstance taskInstance);
|
---|
[439] | 50 |
|
---|
[557] | 51 | /**
|
---|
[1177] | 52 | * <p> |
---|
| 53 | * returns a hash code for the task instance to be able to put it into hash maps |
---|
| 54 | * </p> |
---|
| 55 | * |
---|
| 56 | * @return as described
|
---|
[557] | 57 | */
|
---|
| 58 | public int hashCode();
|
---|
[1146] | 59 | |
---|
| 60 | /** |
---|
[1177] | 61 | * <p> |
---|
| 62 | * clones a task instance by creating exact clones of each contained child instance as well |
---|
| 63 | * as the related task. Furthermore, all other non transient information of the task |
---|
| 64 | * instance must be cloned. |
---|
| 65 | * </p> |
---|
| 66 | * |
---|
| 67 | * @return a clone of the task instance |
---|
[1146] | 68 | */ |
---|
| 69 | public ITaskInstance clone(); |
---|
[557] | 70 |
|
---|
[439] | 71 | }
|
---|