Ignore:
Timestamp:
05/27/13 15:52:39 (11 years ago)
Author:
pharms
Message:
  • improved java doc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInstance.java

    r1146 r1216  
    2424 
    2525/** 
    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> 
    2730 *  
    28  * @version $Revision: $ $Date: $ 
    29  * @author 2011, last modified by $Author: $ 
     31 * @author Patrick Harms 
    3032 */ 
    3133class TaskInstance implements ITaskInstance { 
    3234     
    33     /**  */ 
     35    /** 
     36     * <p> 
     37     * default serial version UID 
     38     * </p> 
     39     */ 
    3440    private static final long serialVersionUID = 1L; 
    3541 
    36     /** */ 
     42    /** 
     43     * <p> 
     44     * used as a counter to generate new ids for each newly created task instance. May overflow. 
     45     * </p> 
     46     */ 
    3747    private static int temporalId = 0; 
    3848 
    39     /** */ 
     49    /** 
     50     * <p> 
     51     * the task instantiated by this task instance 
     52     * </p> 
     53     */ 
    4054    private ITask task; 
    4155     
    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     */ 
    4362    private int id; 
    4463 
    45     /** children */ 
     64    /** 
     65     * <p> 
     66     * the children of this task instance which are task instances, as well 
     67     * </p> 
     68     */ 
    4669    private List<ITaskInstance> children; 
    4770 
    4871    /** 
    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> 
    5076     */ 
    5177    TaskInstance(ITask task) { 
     
    5581 
    5682    /** 
    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 
    6089     */ 
    6190    private static synchronized int getNewId() { 
     
    132161    } 
    133162 
    134     /* 
    135      * (non-Javadoc) 
    136      *  
     163    /* (non-Javadoc) 
    137164     * @see java.lang.Object#hashCode() 
    138165     */ 
     
    142169    } 
    143170 
    144     /* 
    145      * (non-Javadoc) 
    146      *  
     171    /* (non-Javadoc) 
    147172     * @see java.lang.Object#toString() 
    148173     */ 
     
    170195    } 
    171196 
    172     /* 
    173      * (non-Javadoc) 
    174      *  
     197    /* (non-Javadoc) 
    175198     * @see java.lang.Object#clone() 
    176199     */ 
     
    199222 
    200223    /** 
    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 
    202229     */ 
    203230    synchronized void addChild(ITaskInstance child) { 
     
    210237 
    211238    /** 
    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 
    213245     */ 
    214246    synchronized void addChild(int index, ITaskInstance child) { 
     
    221253 
    222254    /** 
    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 
    227262     */ 
    228263    synchronized ITaskInstance removeChild(int index) { 
     
    237272 
    238273    /** 
     274     * <p> 
     275     * used to update the task represented through this instance 
     276     * </p> 
     277     *  
    239278     * @param task the task to set 
    240279     */ 
Note: See TracChangeset for help on using the changeset viewer.