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

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

Used Eclipse code cleanup

File size: 2.2 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.eventcore.Event;
18import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
19import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance;
20
21/**
22 * <p>
23 * Default implementation of {@link IEventTaskInstance}.
24 * </p>
25 *
26 * @author Patrick Harms
27 */
28class EventTaskInstance extends TaskInstance implements IEventTaskInstance {
29
30        /**
31         * <p>
32         * default serial version UID
33         * </p>
34         */
35        private static final long serialVersionUID = 1L;
36
37        /**
38         * <p>
39         * the event represented by this instance
40         * </p>
41         */
42        private final Event event;
43
44        /**
45         * <p>
46         * initializes this instance with the respective task model and the
47         * represented event
48         * </p>
49         *
50         * @param task
51         *            the task of which this is an instance
52         * @param event
53         *            the event represented by this instance
54         */
55        EventTaskInstance(IEventTask task, Event event) {
56                super(task);
57                this.event = event;
58        }
59
60        /*
61         * (non-Javadoc)
62         *
63         * @see de.ugoe.cs.autoquest.tasktrees.treeimpl.IEventTaskInstance#clone()
64         */
65        @Override
66        public synchronized IEventTaskInstance clone() {
67                return (IEventTaskInstance) super.clone();
68        }
69
70        /*
71         * (non-Javadoc)
72         *
73         * @see de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance#getEvent()
74         */
75        @Override
76        public Event getEvent() {
77                return event;
78        }
79
80        /*
81         * (non-Javadoc)
82         *
83         * @see
84         * de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance#getEventTask()
85         */
86        @Override
87        public IEventTask getEventTask() {
88                return (IEventTask) super.getTask();
89        }
90
91}
Note: See TracBrowser for help on using the repository browser.