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
RevLine 
[1113]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
[922]15package de.ugoe.cs.autoquest.tasktrees.treeimpl;
[439]16
[922]17import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
[1146]18import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional;
19import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
[439]20
21/**
22 * TODO comment
23 *
24 * @version $Revision: $ $Date: 19.02.2012$
25 * @author 2012, last modified by $Author: patrick$
26 */
[1146]27class Iteration extends MarkingTemporalRelationship implements IIteration {
[439]28
[1146]29    /**  */
30    private static final long serialVersionUID = 1L;
31
[557]32    /**
33     *
34     */
35    Iteration() {
[1146]36        super("iteration");
[557]37    }
[439]38
[1146]39    /* (non-Javadoc)
40     * @see MarkingTemporalRelationship#setMarkedTask(ITask)
[557]41     */
42    @Override
[1146]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");
[557]47        }
[1146]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);
[439]54    }
55
[557]56    /*
57     * (non-Javadoc)
58     *
59     * @see java.lang.Object#clone()
60     */
61    @Override
62    public Iteration clone() {
63        return (Iteration) super.clone();
64    }
[439]65
66}
Note: See TracBrowser for help on using the repository browser.