Changeset 1215 for trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Task.java
- Timestamp:
- 05/27/13 15:24:09 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Task.java
r1157 r1215 19 19 20 20 /** 21 * TODO comment 21 * <p> 22 * this is the default implementation of the interface {@link ITask}. It 23 * does not do anything fancy except implementing the interface. 24 * </p> 22 25 * 23 * @version $Revision: $ $Date: $ 24 * @author 2011, last modified by $Author: $ 26 * @author Patrick Harms 25 27 */ 26 28 class Task implements ITask { 27 29 28 /** */ 30 /** 31 * <p> 32 * default serial version UID 33 * </p> 34 */ 29 35 private static final long serialVersionUID = 1L; 30 36 31 /** */ 37 /** 38 * <p> 39 * used as a counter to generate new ids for each newly created task. May overflow. 40 * </p> 41 */ 32 42 private static int temporalId = 0; 33 43 34 /** */ 44 /** 45 * <p> 46 * the id of the task (unique throughout the system as long as {@link #temporalId} does not 47 * overflow. 48 * </p> 49 */ 35 50 private int id; 36 51 37 /** */ 52 /** 53 * <p> 54 * a human readable description of the task 55 * </p> 56 */ 38 57 private String description; 39 58 40 59 /** 41 * 60 * <p> 61 * constructs a new task with a new id. The id is generated using the {@link #getNewId()} 62 * methdod 63 * </p> 42 64 */ 43 65 Task() { … … 46 68 47 69 /** 48 * TODO: comment 70 * <p> 71 * creates a new id for a task using {@link #temporalId} by incrementing it an returning its 72 * current value. Resets the counter if {@link Integer.MAX_VALUE} is reached. 73 * </p> 49 74 * 50 * @return 75 * @return a new unique id for a task as long as {@link #temporalId} does not overflow 51 76 */ 52 77 private static synchronized int getNewId() { … … 58 83 } 59 84 60 /* *61 * @ return Returns the name.85 /* (non-Javadoc) 86 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITask#geId() 62 87 */ 88 @Override 63 89 public int getId() { 64 90 return id; 65 91 } 66 92 67 /* 68 * (non-Javadoc) 69 * 70 * @see de.ugoe.cs.tasktree.treeifc.TaskTreeNode#getDescription() 93 /* (non-Javadoc) 94 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITask#getDescription() 71 95 */ 72 96 @Override … … 75 99 } 76 100 77 /* 78 * (non-Javadoc) 79 * 80 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.TaskTreeNode#equals(TaskTreeNode) 101 /* (non-Javadoc) 102 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITask#equals(ITask) 81 103 */ 82 104 @Override … … 87 109 } 88 110 89 /* 90 * (non-Javadoc) 91 * 92 * @see java.lang.Object#hashCode() 111 /* (non-Javadoc) 112 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITask#hashCode() 93 113 */ 94 114 @Override … … 97 117 } 98 118 99 /* 100 * (non-Javadoc) 101 * 119 /* (non-Javadoc) 102 120 * @see java.lang.Object#toString() 103 121 */ … … 117 135 } 118 136 119 /* 120 * (non-Javadoc) 121 * 122 * @see java.lang.Object#clone() 137 /* (non-Javadoc) 138 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITask#clone() 123 139 */ 124 140 @Override … … 137 153 138 154 /** 139 * TODO: comment 155 * <p> 156 * internally used to set the human readable description of the task 157 * </p> 140 158 * 141 * @param i 142 * @return 159 * @param description the new human readable description of the task 143 160 */ 144 161 void setDescription(String description) { … … 147 164 148 165 /* (non-Javadoc) 149 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITask#accept( de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor)166 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITask#accept(ITaskVisitor) 150 167 */ 151 168 @Override
Note: See TracChangeset
for help on using the changeset viewer.