source: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityResult.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.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.usability.rules;
16
17import com.google.common.collect.ArrayListMultimap;
18import com.google.common.collect.Multimap;
19
20import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription;
21import de.ugoe.cs.autoquest.usability.result.UsabilityProblemSeverityLevel;
22
23/**
24 * <p>
25 * The result of the usability evaluation, which contains all detected problems.
26 * </p>
27 *
28 * @author Alexander Deicke
29 */
30public class UsabilityResult {
31
32    /**
33     * <p>
34     * All detected problems and their appropriate severity level.
35     * </p>
36     */
37    private Multimap<UsabilityProblemSeverityLevel, UsabilityProblemDescription> detectedProblems;
38
39    /**
40     *
41     * <p>
42     * Constructor. Creates a new result.
43     * </p>
44     *
45     */
46    public UsabilityResult() {
47        this.detectedProblems = ArrayListMultimap.create();
48    }
49
50    /**
51     * <p>
52     * Adds a usability problem to the result.
53     * </p>
54     *
55     * @param usabilityProblem
56     *            the problem, which should be added.
57     */
58    public void addProblem(UsabilityProblemDescription usabilityProblem) {
59        this.detectedProblems.put(usabilityProblem.getSeverityLevel(), usabilityProblem);
60    }
61
62    /**
63     *
64     * <p>
65     * Checks, if problems were found during the usability evaluation.
66     * </p>
67     *
68     * @return true, iff problems were found
69     */
70    public boolean hasDetectedProblems() {
71        return !this.detectedProblems.isEmpty();
72    }
73
74}
Note: See TracBrowser for help on using the repository browser.