source: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/util/NullTask.java @ 1217

Last change on this file since 1217 was 1217, checked in by adeicke, 11 years ago
  • Added proper formating and JavaDoc?.
  • Several renaming refactorings.
  • Property svn:mime-type set to text/plain
File size: 2.4 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.usability.util;
16
17import org.apache.commons.lang.StringUtils;
18
19import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
20import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor;
21
22/**
23 * <p>
24 * Implementation of Null Object pattern {@link http://en.wikipedia.org/wiki/Null_Object_pattern}.
25 * </p>
26 *
27 * @author Alexander Deicke
28 */
29public class NullTask implements ITask {
30
31    private static final long serialVersionUID = 1236779392413787860L;
32
33    /*
34     * (non-Javadoc)
35     *
36     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITask#getId()
37     */
38    @Override
39    public int getId() {
40        return -1;
41    }
42
43    /*
44     * (non-Javadoc)
45     *
46     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#getName()
47     */
48    public String getName() {
49        return StringUtils.EMPTY;
50    }
51
52    /*
53     * (non-Javadoc)
54     *
55     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#getDescription()
56     */
57    public String getDescription() {
58        return StringUtils.EMPTY;
59    }
60
61    /*
62     * (non-Javadoc)
63     *
64     * @see
65     * de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#equals(de.ugoe.cs.autoquest.tasktrees
66     * .treeifc.ITaskTreeNode)
67     */
68    public boolean equals(ITask task) {
69        return false;
70    }
71
72    /*
73     * (non-Javadoc)
74     *
75     * @see java.lang.Object#clone()
76     */
77    @Override
78    public NullTask clone() {
79        return (NullTask) this;
80    }
81
82    /*
83     * (non-Javadoc)
84     *
85     * @see
86     * de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#accept(de.ugoe.cs.autoquest.tasktrees
87     * .treeifc.NodeVisitor)
88     */
89    public void accept(ITaskVisitor visitor) {
90        // do nothing
91    }
92
93}
Note: See TracBrowser for help on using the repository browser.