source: trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Iteration.java @ 1146

Last change on this file since 1146 was 1146, checked in by pharms, 11 years ago
  • complete refactoring of task tree model with a separation of task models and task instances
  • appropriate adaptation of task tree generation process
  • appropriate adaptation of commands and task tree visualization
  • Property svn:executable set to *
File size: 1.9 KB
Line 
1//   Copyright 2012 Georg-August-Universität Göttingen, Germany
2//
3//   Licensed under the Apache License, Version 2.0 (the "License");
4//   you may not use this file except in compliance with the License.
5//   You may obtain a copy of the License at
6//
7//       http://www.apache.org/licenses/LICENSE-2.0
8//
9//   Unless required by applicable law or agreed to in writing, software
10//   distributed under the License is distributed on an "AS IS" BASIS,
11//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//   See the License for the specific language governing permissions and
13//   limitations under the License.
14
15package de.ugoe.cs.autoquest.tasktrees.treeimpl;
16
17import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
18import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional;
19import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
20
21/**
22 * TODO comment
23 *
24 * @version $Revision: $ $Date: 19.02.2012$
25 * @author 2012, last modified by $Author: patrick$
26 */
27class Iteration extends MarkingTemporalRelationship implements IIteration {
28
29    /**  */
30    private static final long serialVersionUID = 1L;
31
32    /**
33     *
34     */
35    Iteration() {
36        super("iteration");
37    }
38
39    /* (non-Javadoc)
40     * @see MarkingTemporalRelationship#setMarkedTask(ITask)
41     */
42    @Override
43    protected void setMarkedTask(ITask markedTask) {
44        if (markedTask instanceof IIteration) {
45            throw new IllegalArgumentException
46                ("the marked task of an iteration must not be an iteration");
47        }
48        else if (markedTask instanceof IOptional) {
49            throw new IllegalArgumentException
50                ("the marked task of an iteration must not be an optional");
51        }
52       
53        super.setMarkedTask(markedTask);
54    }
55
56    /*
57     * (non-Javadoc)
58     *
59     * @see java.lang.Object#clone()
60     */
61    @Override
62    public Iteration clone() {
63        return (Iteration) super.clone();
64    }
65
66}
Note: See TracBrowser for help on using the repository browser.