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.tasktrees.treeifc.ISelection; |
---|
18 | import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; |
---|
19 | import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor; |
---|
20 | |
---|
21 | /** |
---|
22 | * TODO comment |
---|
23 | * |
---|
24 | * @version $Revision: $ $Date: 19.02.2012$ |
---|
25 | * @author 2012, last modified by $Author: patrick$ |
---|
26 | */ |
---|
27 | class Selection extends StructuringTemporalRelationship implements ISelection { |
---|
28 | |
---|
29 | /** */ |
---|
30 | private static final long serialVersionUID = 1L; |
---|
31 | |
---|
32 | /** |
---|
33 | * TODO: comment |
---|
34 | * |
---|
35 | * @param name |
---|
36 | */ |
---|
37 | Selection() { |
---|
38 | super("selection"); |
---|
39 | } |
---|
40 | |
---|
41 | /* |
---|
42 | * (non-Javadoc) |
---|
43 | * |
---|
44 | * @see java.lang.Object#clone() |
---|
45 | */ |
---|
46 | @Override |
---|
47 | public Selection clone() { |
---|
48 | return (Selection) super.clone(); |
---|
49 | } |
---|
50 | |
---|
51 | /** |
---|
52 | * <p> |
---|
53 | * TODO: comment |
---|
54 | * </p> |
---|
55 | * |
---|
56 | * @param i |
---|
57 | * @param newChild |
---|
58 | */ |
---|
59 | public void addChild(ITask newChild) { |
---|
60 | super.addChild(newChild); |
---|
61 | super.setDescription("selection of " + newChild); |
---|
62 | } |
---|
63 | |
---|
64 | /** |
---|
65 | * <p> |
---|
66 | * TODO: comment |
---|
67 | * </p> |
---|
68 | * |
---|
69 | * @param i |
---|
70 | * @param newChild |
---|
71 | */ |
---|
72 | public void addChild(int index, ITask newChild) { |
---|
73 | super.addChild(index, newChild); |
---|
74 | super.setDescription("selection of " + newChild); |
---|
75 | } |
---|
76 | |
---|
77 | /* (non-Javadoc) |
---|
78 | * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITemporalRelationship#accept(de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor) |
---|
79 | */ |
---|
80 | @Override |
---|
81 | public void accept(ITaskVisitor visitor) { |
---|
82 | visitor.visit(this); |
---|
83 | } |
---|
84 | |
---|
85 | } |
---|