[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 |
|
---|
| 15 | package de.ugoe.cs.autoquest.usability;
|
---|
| 16 |
|
---|
| 17 | import com.google.common.base.Optional;
|
---|
| 18 |
|
---|
[1217] | 19 | import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription;
|
---|
[1150] | 20 | import de.ugoe.cs.autoquest.usability.rules.UsabilityMetric;
|
---|
[1217] | 21 | import de.ugoe.cs.autoquest.usability.rules.UsabilityUsageProblem;
|
---|
[1150] | 22 |
|
---|
| 23 | /**
|
---|
| 24 | * <p>
|
---|
[1217] | 25 | * Helper class, which calls the evaluation method depending on the type of the usability rule.
|
---|
[1150] | 26 | * </p>
|
---|
| 27 | *
|
---|
| 28 | * @author Alexander Deicke
|
---|
| 29 | */
|
---|
| 30 | public class EvaluationMethodCaller {
|
---|
[1217] | 31 |
|
---|
| 32 | /**
|
---|
| 33 | *
|
---|
| 34 | * <p>
|
---|
| 35 | * Calls evaluation method of a usability metric.
|
---|
| 36 | * </p>
|
---|
| 37 | *
|
---|
| 38 | * @param metric
|
---|
| 39 | * on which evaluation method should be called
|
---|
| 40 | * @return description of metric/defect, iff metric exceeds predefined threshold
|
---|
| 41 | */
|
---|
| 42 | public Optional<UsabilityProblemDescription> check(UsabilityMetric metric) {
|
---|
[1150] | 43 | return metric.calculate();
|
---|
| 44 | }
|
---|
[1217] | 45 |
|
---|
| 46 | /**
|
---|
| 47 | *
|
---|
| 48 | * <p>
|
---|
| 49 | * Calls evaluation method of a usability usage defect.
|
---|
| 50 | * </p>
|
---|
| 51 | *
|
---|
| 52 | * @param usageDefect
|
---|
| 53 | * on which evaluation method should be called
|
---|
| 54 | * @return description of usage defect, iff it was detected during the usability evaluation
|
---|
| 55 | */
|
---|
| 56 | public Optional<UsabilityProblemDescription> check(UsabilityUsageProblem usageDefect) {
|
---|
| 57 | return usageDefect.check();
|
---|
[1150] | 58 | }
|
---|
| 59 | }
|
---|