[1138] | 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.usability.rules;
|
---|
| 16 |
|
---|
| 17 | import com.google.common.collect.ArrayListMultimap;
|
---|
| 18 | import com.google.common.collect.Multimap;
|
---|
| 19 |
|
---|
[1217] | 20 | import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription;
|
---|
| 21 | import de.ugoe.cs.autoquest.usability.result.UsabilityProblemSeverityLevel;
|
---|
[1138] | 22 |
|
---|
| 23 | /**
|
---|
| 24 | * <p>
|
---|
[1217] | 25 | * The result of the usability evaluation, which contains all detected problems.
|
---|
[1138] | 26 | * </p>
|
---|
| 27 | *
|
---|
| 28 | * @author Alexander Deicke
|
---|
| 29 | */
|
---|
| 30 | public class UsabilityResult {
|
---|
[1217] | 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 | */
|
---|
[1138] | 46 | public UsabilityResult() {
|
---|
[1217] | 47 | this.detectedProblems = ArrayListMultimap.create();
|
---|
[1138] | 48 | }
|
---|
| 49 |
|
---|
| 50 | /**
|
---|
| 51 | * <p>
|
---|
[1217] | 52 | * Adds a usability problem to the result.
|
---|
[1138] | 53 | * </p>
|
---|
[1217] | 54 | *
|
---|
| 55 | * @param usabilityProblem
|
---|
| 56 | * the problem, which should be added.
|
---|
[1138] | 57 | */
|
---|
[1217] | 58 | public void addProblem(UsabilityProblemDescription usabilityProblem) {
|
---|
| 59 | this.detectedProblems.put(usabilityProblem.getSeverityLevel(), usabilityProblem);
|
---|
[1138] | 60 | }
|
---|
[1217] | 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();
|
---|
[1138] | 72 | }
|
---|
| 73 |
|
---|
| 74 | }
|
---|