Changeset 557 for trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees/treeimpl/Iteration.java
- Timestamp:
- 08/17/12 08:33:29 (12 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees/treeimpl/Iteration.java
r498 r557 1 //-------------------------------------------------------------------------------------------------2 1 // Module : $RCSfile: Iteration.java,v $ 3 2 // Version : $Revision: 0.0 $ $Author: patrick $ $Date: 19.02.2012 $ … … 5 4 // Creation : 2012 by patrick 6 5 // Copyright : Patrick Harms, 2012 7 //------------------------------------------------------------------------------------------------- 6 7 8 8 package de.ugoe.cs.quest.tasktrees.treeimpl; 9 9 10 import de.ugoe.cs.quest.tasktrees.treeifc.I teration;11 import de.ugoe.cs.quest.tasktrees.treeifc. TaskTreeNode;10 import de.ugoe.cs.quest.tasktrees.treeifc.IIteration; 11 import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNode; 12 12 13 //-------------------------------------------------------------------------------------------------14 13 /** 15 14 * TODO comment … … 18 17 * @author 2012, last modified by $Author: patrick$ 19 18 */ 20 //------------------------------------------------------------------------------------------------- 21 public class IterationImpl extends TaskTreeNodeImpl implements Iteration 22 { 19 public class Iteration extends TaskTreeNode implements IIteration { 23 20 24 //----------------------------------------------------------------------------------------------- 25 /** 26 * 27 */ 28 //----------------------------------------------------------------------------------------------- 29 IterationImpl() 30 { 31 super("Iteration"); 32 } 21 /** 22 * 23 */ 24 Iteration() { 25 super("Iteration"); 26 } 33 27 34 //-----------------------------------------------------------------------------------------------35 /* (non-Javadoc)36 * @see de.ugoe.cs.tasktree.treeifc.TaskTreeNode#addChild(TaskTreeNode)37 */38 //-----------------------------------------------------------------------------------------------39 @Override40 public void addChild(TaskTreeNode child)41 {42 // adding more children is not allowed43 throw new UnsupportedOperationException();44 }28 /* 29 * (non-Javadoc) 30 * 31 * @see de.ugoe.cs.tasktree.treeifc.TaskTreeNode#addChild(TaskTreeNode) 32 */ 33 @Override 34 public void addChild(ITaskTreeNode child) { 35 // adding more children is not allowed 36 throw new UnsupportedOperationException 37 ("iterations may not have a list of children. Use setChild() instead."); 38 } 45 39 46 //----------------------------------------------------------------------------------------------- 47 /** 48 * TODO: comment 49 * 50 * @param selection 51 * @return 52 */ 53 //----------------------------------------------------------------------------------------------- 54 public void setChild(TaskTreeNode child) 55 { 56 if (super.getChildren().size() > 0) 57 { 58 super.removeChild(0); 40 /** 41 * TODO: comment 42 * 43 * @param selection 44 * @return 45 */ 46 public void setChild(ITaskTreeNode child) { 47 if (super.getChildren().size() > 0) { 48 super.removeChild(0); 49 } 50 super.addChild(child); 59 51 } 60 super.addChild(child);61 }62 52 63 //----------------------------------------------------------------------------------------------- 64 /* (non-Javadoc) 65 * @see java.lang.Object#clone() 66 */ 67 //----------------------------------------------------------------------------------------------- 68 @Override 69 public IterationImpl clone() 70 { 71 return (IterationImpl) super.clone(); 72 } 53 /* 54 * (non-Javadoc) 55 * 56 * @see java.lang.Object#clone() 57 */ 58 @Override 59 public Iteration clone() { 60 return (Iteration) super.clone(); 61 } 73 62 74 63 }
Note: See TracChangeset
for help on using the changeset viewer.