[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 |
|
---|
| 20 | import de.ugoe.cs.autoquest.usability.result.UsabilityDefect;
|
---|
| 21 | import de.ugoe.cs.autoquest.usability.result.UsabilityDefectSeverityLevel;
|
---|
| 22 |
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * <p>
|
---|
| 26 | * TODO comment
|
---|
| 27 | * </p>
|
---|
| 28 | *
|
---|
| 29 | * @author Alexander Deicke
|
---|
| 30 | */
|
---|
| 31 | public class UsabilityResult {
|
---|
| 32 |
|
---|
| 33 | private Multimap<UsabilityDefectSeverityLevel, UsabilityDefect> detectedDefects;
|
---|
| 34 |
|
---|
| 35 | public UsabilityResult() {
|
---|
| 36 | this.detectedDefects = ArrayListMultimap.create();
|
---|
| 37 | }
|
---|
| 38 |
|
---|
| 39 | /**
|
---|
| 40 | * <p>
|
---|
| 41 | * TODO: comment
|
---|
| 42 | * </p>
|
---|
| 43 | *
|
---|
| 44 | * @param usabilityDefect
|
---|
| 45 | */
|
---|
| 46 | public void addDefect(UsabilityDefect usabilityDefect) {
|
---|
| 47 | this.detectedDefects.put(usabilityDefect.getSeverityLevel(), usabilityDefect);
|
---|
| 48 | }
|
---|
| 49 |
|
---|
| 50 | public boolean hasDefects() {
|
---|
| 51 | return !this.detectedDefects.isEmpty();
|
---|
| 52 | }
|
---|
| 53 |
|
---|
| 54 | }
|
---|