[1294] | 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 | |
---|
| 15 | package de.ugoe.cs.autoquest.tasktrees.treeimpl; |
---|
| 16 | |
---|
| 17 | import de.ugoe.cs.autoquest.eventcore.Event; |
---|
| 18 | import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; |
---|
| 19 | import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance; |
---|
| 20 | |
---|
| 21 | /** |
---|
| 22 | * <p> |
---|
[1414] | 23 | * Default implementation of {@link IEventTaskInstance}. |
---|
[1294] | 24 | * </p> |
---|
| 25 | * |
---|
| 26 | * @author Patrick Harms |
---|
| 27 | */ |
---|
| 28 | class EventTaskInstance extends TaskInstance implements IEventTaskInstance { |
---|
| 29 | |
---|
[1733] | 30 | /** |
---|
| 31 | * <p> |
---|
| 32 | * default serial version UID |
---|
| 33 | * </p> |
---|
| 34 | */ |
---|
| 35 | private static final long serialVersionUID = 1L; |
---|
[1294] | 36 | |
---|
[1733] | 37 | /** |
---|
| 38 | * <p> |
---|
| 39 | * the event represented by this instance |
---|
| 40 | * </p> |
---|
| 41 | */ |
---|
| 42 | private final Event event; |
---|
[1294] | 43 | |
---|
[1733] | 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 | } |
---|
[1294] | 59 | |
---|
[1733] | 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 | } |
---|
[1294] | 69 | |
---|
[1733] | 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 | } |
---|
[1294] | 79 | |
---|
[1733] | 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 | |
---|
[1294] | 91 | } |
---|