Changeset 1216 for trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInstance.java
- Timestamp:
- 05/27/13 15:52:39 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInstance.java
r1146 r1216 24 24 25 25 /** 26 * TODO comment 26 * <p> 27 * this is the default implementation of the interface {@link ITaskInstance}. It 28 * does not do anything fancy except implementing the interface. 29 * </p> 27 30 * 28 * @version $Revision: $ $Date: $ 29 * @author 2011, last modified by $Author: $ 31 * @author Patrick Harms 30 32 */ 31 33 class TaskInstance implements ITaskInstance { 32 34 33 /** */ 35 /** 36 * <p> 37 * default serial version UID 38 * </p> 39 */ 34 40 private static final long serialVersionUID = 1L; 35 41 36 /** */ 42 /** 43 * <p> 44 * used as a counter to generate new ids for each newly created task instance. May overflow. 45 * </p> 46 */ 37 47 private static int temporalId = 0; 38 48 39 /** */ 49 /** 50 * <p> 51 * the task instantiated by this task instance 52 * </p> 53 */ 40 54 private ITask task; 41 55 42 /** */ 56 /** 57 * <p> 58 * the id of the task instance (unique throughout the system as long as {@link #temporalId} 59 * does not overflow. 60 * </p> 61 */ 43 62 private int id; 44 63 45 /** children */ 64 /** 65 * <p> 66 * the children of this task instance which are task instances, as well 67 * </p> 68 */ 46 69 private List<ITaskInstance> children; 47 70 48 71 /** 49 * 72 * <p> 73 * instantiated the task instance with the task that is instantiated by the instance. It also 74 * assigns a unique id to the instance using {@link #getNewId()}. 75 * </p> 50 76 */ 51 77 TaskInstance(ITask task) { … … 55 81 56 82 /** 57 * TODO: comment 58 * 59 * @return 83 * <p> 84 * creates a new id for a task instance using {@link #temporalId} by incrementing it an 85 * returning its current value. Resets the counter if {@link Integer.MAX_VALUE} is reached. 86 * </p> 87 * 88 * @return a new unique id for a task instance as long as {@link #temporalId} does not overflow 60 89 */ 61 90 private static synchronized int getNewId() { … … 132 161 } 133 162 134 /* 135 * (non-Javadoc) 136 * 163 /* (non-Javadoc) 137 164 * @see java.lang.Object#hashCode() 138 165 */ … … 142 169 } 143 170 144 /* 145 * (non-Javadoc) 146 * 171 /* (non-Javadoc) 147 172 * @see java.lang.Object#toString() 148 173 */ … … 170 195 } 171 196 172 /* 173 * (non-Javadoc) 174 * 197 /* (non-Javadoc) 175 198 * @see java.lang.Object#clone() 176 199 */ … … 199 222 200 223 /** 201 * 224 * <p> 225 * used to add a child to this task instance 226 * </p> 227 * 228 * @param child the new child of this instance 202 229 */ 203 230 synchronized void addChild(ITaskInstance child) { … … 210 237 211 238 /** 212 * 239 * <p> 240 * used to add a child to this task instance at a specific position 241 * </p> 242 * 243 * @param index the position of the new child in the list of children 244 * @param child the new child of this instance 213 245 */ 214 246 synchronized void addChild(int index, ITaskInstance child) { … … 221 253 222 254 /** 223 * TODO: comment 224 * 225 * @param i 226 * @return 255 * <p> 256 * removes a child from this task instance at a specific position 257 * </p> 258 * 259 * @param index the position of the child to be removed 260 * 261 * @return the child remove from the children of this instance 227 262 */ 228 263 synchronized ITaskInstance removeChild(int index) { … … 237 272 238 273 /** 274 * <p> 275 * used to update the task represented through this instance 276 * </p> 277 * 239 278 * @param task the task to set 240 279 */
Note: See TracChangeset
for help on using the changeset viewer.