Changeset 1733 for branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/MarkingTemporalRelationship.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/treeimpl/MarkingTemporalRelationship.java
r1357 r1733 20 20 /** 21 21 * <p> 22 * this is the default implementation of the interface {@link IMarkingTemporalRelationship}. It 23 * does not do anything fancy except implementing the interface. 22 * this is the default implementation of the interface 23 * {@link IMarkingTemporalRelationship}. It does not do anything fancy except 24 * implementing the interface. 24 25 * </p> 25 26 * 26 27 * @author Patrick Harms 27 28 */ 28 abstract class MarkingTemporalRelationship extends Task 29 implements IMarkingTemporalRelationship 30 { 29 abstract class MarkingTemporalRelationship extends Task implements 30 IMarkingTemporalRelationship { 31 31 32 33 34 35 36 37 32 /** 33 * <p> 34 * default serial version UID 35 * </p> 36 */ 37 private static final long serialVersionUID = 1L; 38 38 39 /** 40 * <p> 41 * the task marked through this marking temporal relationship 42 * </p> 43 */ 44 private ITask markedTask; 45 46 /** 47 * <p> 48 * initializes this temporal relationship with a human readable name 49 * </p> 50 * 51 * @param relationshipType the human readable name of this temporal relationship 52 */ 53 MarkingTemporalRelationship(String relationshipType) { 54 super(relationshipType); 55 56 if ((relationshipType == null) || ("".equals(relationshipType))) { 57 throw new IllegalArgumentException 58 ("the relationship type must be something meaningful"); 59 } 60 } 39 /** 40 * <p> 41 * the task marked through this marking temporal relationship 42 * </p> 43 */ 44 private ITask markedTask; 61 45 62 /* (non-Javadoc) 63 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.IMarkingTemporalRelationship#getMarkedTask() 64 */ 65 @Override 66 public ITask getMarkedTask() { 67 return markedTask; 68 } 46 /** 47 * <p> 48 * initializes this temporal relationship with a human readable name 49 * </p> 50 * 51 * @param relationshipType 52 * the human readable name of this temporal relationship 53 */ 54 MarkingTemporalRelationship(String relationshipType) { 55 super(relationshipType); 69 56 70 /* (non-Javadoc) 71 * @see de.ugoe.cs.autoquest.tasktrees.treeimpl.Task#clone() 72 */ 73 @Override 74 public synchronized MarkingTemporalRelationship clone() { 75 MarkingTemporalRelationship clone = null; 76 clone = (MarkingTemporalRelationship) super.clone(); 77 78 if (markedTask != null) { 79 clone.markedTask = markedTask.clone(); 80 } 57 if ((relationshipType == null) || ("".equals(relationshipType))) { 58 throw new IllegalArgumentException( 59 "the relationship type must be something meaningful"); 60 } 61 } 81 62 82 return clone; 83 } 63 /* 64 * (non-Javadoc) 65 * 66 * @see de.ugoe.cs.autoquest.tasktrees.treeimpl.Task#clone() 67 */ 68 @Override 69 public synchronized MarkingTemporalRelationship clone() { 70 MarkingTemporalRelationship clone = null; 71 clone = (MarkingTemporalRelationship) super.clone(); 84 72 85 /** 86 * <p> 87 * used to set the marked task 88 * </p> 89 * 90 * @param markedTask the marked task to set 91 */ 92 protected void setMarkedTask(ITask markedTask) { 93 this.markedTask = markedTask; 94 95 super.setDescription(markedTask.toString()); 96 } 73 if (markedTask != null) { 74 clone.markedTask = markedTask.clone(); 75 } 76 77 return clone; 78 } 79 80 /* 81 * (non-Javadoc) 82 * 83 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.IMarkingTemporalRelationship# 84 * getMarkedTask() 85 */ 86 @Override 87 public ITask getMarkedTask() { 88 return markedTask; 89 } 90 91 /** 92 * <p> 93 * used to set the marked task 94 * </p> 95 * 96 * @param markedTask 97 * the marked task to set 98 */ 99 protected void setMarkedTask(ITask markedTask) { 100 this.markedTask = markedTask; 101 102 super.setDescription(markedTask.toString()); 103 } 97 104 98 105 }
Note: See TracChangeset
for help on using the changeset viewer.