Changeset 1733 for branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITask.java
- Timestamp:
- 09/05/14 19:33:12 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITask.java
r1400 r1733 20 20 /** 21 21 * <p> 22 * A task represents a model for events that occur if the user interacts with a software for 23 * achieving a specific goal. A task can be a single event or a complex structure of events 24 * and temporal relationships defining the event order. Tasks may especially refer to other tasks 25 * to create task structures similar to trees. These structures fully define in which ways the 26 * events that form the task can occur. However, the structure of a task is not necessarily a 27 * tree as task structures may be reused several times in larger scale task structures. 22 * A task represents a model for events that occur if the user interacts with a 23 * software for achieving a specific goal. A task can be a single event or a 24 * complex structure of events and temporal relationships defining the event 25 * order. Tasks may especially refer to other tasks to create task structures 26 * similar to trees. These structures fully define in which ways the events that 27 * form the task can occur. However, the structure of a task is not necessarily 28 * a tree as task structures may be reused several times in larger scale task 29 * structures. 28 30 * </p> 29 31 * … … 32 34 public interface ITask extends Cloneable, Serializable { 33 35 34 /** 35 * <p> 36 * every task is assigned a unique id which is returned by this method. The id is unique for 37 * the current runtime. 38 * </p> 39 * 40 * @return as described 41 */ 42 public int getId(); 36 /** 37 * <p> 38 * implements the visitor pattern to be able to process tasks and their 39 * children. 40 * </p> 41 * 42 * @param visitor 43 * the visitor used to process the task 44 */ 45 public void accept(ITaskVisitor visitor); 43 46 44 /** 45 * <p> 46 * returns a human readable type for the task. 47 * </p> 48 * 49 * @return as described 50 */ 51 public String getType(); 47 /** 48 * <p> 49 * returns an exact copy of this task. The clone has the same id. If the 50 * task has children, they are cloned as well. A call on the method 51 * {@link #equals(ITask)} with the result of this method must return true. 52 * </p> 53 * 54 * @return as described 55 */ 56 public ITask clone(); 52 57 53 /** 54 * <p> 55 * returns a human readable description for the task. 56 * </p> 57 * 58 * @return as described 59 */ 60 public String getDescription(); 58 /** 59 * <p> 60 * checks whether this task is equal to another one. Task equality is only 61 * given, if two tasks have the same id. This means, that this method must 62 * only return true if the other task is either the same object or a clone 63 * of it. 64 * </p> 65 * 66 * @return as described 67 */ 68 public boolean equals(ITask task); 61 69 62 63 64 * returns a collection of all observed instances of this task 65 66 67 68 69 public Collection<ITaskInstance> getInstances();70 /** 71 * <p> 72 * returns a human readable description for the task. 73 * </p> 74 * 75 * @return as described 76 */ 77 public String getDescription(); 70 78 71 /** 72 * <p> 73 * returns a collection of collections of all different execution variants of this task. This 74 * is a grouping of all instances where each group contains structurally identical instances. 75 * </p> 76 * 77 * @return as described 78 */ 79 public Collection<Collection<ITaskInstance>> getExecutionVariants(); 79 /** 80 * <p> 81 * returns a collection of collections of all different execution variants 82 * of this task. This is a grouping of all instances where each group 83 * contains structurally identical instances. 84 * </p> 85 * 86 * @return as described 87 */ 88 public Collection<Collection<ITaskInstance>> getExecutionVariants(); 80 89 81 /** 82 * <p> 83 * checks whether this task is equal to another one. Task equality is only given, if two 84 * tasks have the same id. This means, that this method must only return true if the other 85 * task is either the same object or a clone of it. 86 * </p> 87 * 88 * @return as described 89 */ 90 public boolean equals(ITask task); 90 /** 91 * <p> 92 * every task is assigned a unique id which is returned by this method. The 93 * id is unique for the current runtime. 94 * </p> 95 * 96 * @return as described 97 */ 98 public int getId(); 91 99 92 93 94 * returns a hash code for the task, which is usually the id returned by {@link #getId()}. 95 96 97 98 99 public int hashCode();100 /** 101 * <p> 102 * returns a collection of all observed instances of this task 103 * </p> 104 * 105 * @return as described 106 */ 107 public Collection<ITaskInstance> getInstances(); 100 108 101 102 103 * returns an exact copy of this task. The clone has the same id. If the task has 104 * children, they are cloned as well. A call on the method {@link #equals(ITask)} with the 105 * result of this method must return true. 106 * </p> 107 * 108 * @return as described 109 */ 110 public ITask clone(); 111 112 /** 113 * <p> 114 * implements the visitor pattern to be able to process tasks and their children. 115 * </p> 116 * 117 * @param visitor the visitor used to process the task 118 */ 119 public void accept(ITaskVisitor visitor);120 109 /** 110 * <p> 111 * returns a human readable type for the task. 112 * </p> 113 * 114 * @return as described 115 */ 116 public String getType(); 117 118 /** 119 * <p> 120 * returns a hash code for the task, which is usually the id returned by 121 * {@link #getId()}. 122 * </p> 123 * 124 * @return as described 125 */ 126 @Override 127 public int hashCode(); 128 121 129 }
Note: See TracChangeset
for help on using the changeset viewer.