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

Last change on this file since 1319 was 1319, checked in by khartmann, 11 years ago
  • Reworked Filters to use the first instance of a task to provide type and target
  • Added a function to extract all tasks matching a given filter
  • Added simple console feedback for matched usability problems
  • Property svn:mime-type set to text/plain
File size: 2.7 KB
RevLine 
[1150]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
[1319]17import java.util.Collection;
18import java.util.Collections;
19
[1150]20import org.apache.commons.lang.StringUtils;
21
[1152]22import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
[1319]23import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
[1163]24import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor;
[1150]25
26/**
27 * <p>
[1217]28 * Implementation of Null Object pattern {@link http://en.wikipedia.org/wiki/Null_Object_pattern}.
[1150]29 * </p>
30 *
31 * @author Alexander Deicke
32 */
[1163]33public class NullTask implements ITask {
[1150]34
[1163]35    private static final long serialVersionUID = 1236779392413787860L;
36
[1217]37    /*
38     * (non-Javadoc)
39     *
[1163]40     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITask#getId()
41     */
42    @Override
43    public int getId() {
44        return -1;
45    }
[1217]46
47    /*
48     * (non-Javadoc)
49     *
[1150]50     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#getName()
51     */
52    public String getName() {
53        return StringUtils.EMPTY;
54    }
55
[1217]56    /*
57     * (non-Javadoc)
58     *
[1150]59     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#getDescription()
60     */
61    public String getDescription() {
62        return StringUtils.EMPTY;
63    }
64
[1217]65    /*
66     * (non-Javadoc)
67     *
68     * @see
69     * de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#equals(de.ugoe.cs.autoquest.tasktrees
70     * .treeifc.ITaskTreeNode)
[1150]71     */
[1152]72    public boolean equals(ITask task) {
[1150]73        return false;
74    }
[1217]75
76    /*
77     * (non-Javadoc)
78     *
[1150]79     * @see java.lang.Object#clone()
80     */
81    @Override
[1163]82    public NullTask clone() {
83        return (NullTask) this;
[1150]84    }
85
[1217]86    /*
87     * (non-Javadoc)
88     *
89     * @see
90     * de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#accept(de.ugoe.cs.autoquest.tasktrees
91     * .treeifc.NodeVisitor)
[1150]92     */
[1163]93    public void accept(ITaskVisitor visitor) {
94        // do nothing
[1150]95    }
[1217]96
[1319]97    @Override
98    public Collection<ITaskInstance> getInstances() {
99        // return nothing
100        return Collections.emptyList();
101    }
102
[1150]103}
Note: See TracBrowser for help on using the repository browser.