source: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Iteration.java @ 1733

Last change on this file since 1733 was 1733, checked in by rkrimmel, 10 years ago

Used Eclipse code cleanup

  • Property svn:executable set to *
File size: 2.1 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 * <p>
23 * this is the default implementation of the interface {@link IIteration}. It
24 * does not do anything fancy except implementing the interface.
25 * </p>
26 *
27 * @author Patrick Harms
28 */
29class Iteration extends MarkingTemporalRelationship implements IIteration {
30
31        /**
32         * <p>
33         * default serial version UID
34         * </p>
35         */
36        private static final long serialVersionUID = 1L;
37
38        /**
39         * <p>
40         * simple constructor providing the base class with a human readable name of
41         * the type of this task
42         * </p>
43         */
44        Iteration() {
45                super("iteration");
46        }
47
48        /*
49         * (non-Javadoc)
50         *
51         * @see
52         * de.ugoe.cs.autoquest.tasktrees.treeimpl.MarkingTemporalRelationship#clone
53         * ()
54         */
55        @Override
56        public Iteration clone() {
57                return (Iteration) super.clone();
58        }
59
60        /*
61         * (non-Javadoc)
62         *
63         * @see de.ugoe.cs.autoquest.tasktrees.treeimpl.MarkingTemporalRelationship#
64         * setMarkedTask(ITask)
65         */
66        @Override
67        protected void setMarkedTask(ITask markedTask) {
68                if (markedTask instanceof IIteration) {
69                        throw new IllegalArgumentException(
70                                        "the marked task of an iteration must not be an iteration");
71                } else if (markedTask instanceof IOptional) {
72                        throw new IllegalArgumentException(
73                                        "the marked task of an iteration must not be an optional");
74                }
75
76                super.setMarkedTask(markedTask);
77        }
78
79}
Note: See TracBrowser for help on using the repository browser.