source: trunk/autoquest-core-usability/src/main/java/de/ugoe/cs/autoquest/usability/UsabilityEvaluationResult.java @ 1918

Last change on this file since 1918 was 1918, checked in by pharms, 9 years ago
  • extension with further smell detections
  • may not fully work. But Hudson is more happy because compile errors should be gone
File size: 2.5 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;
16
17import java.util.ArrayList;
18import java.util.List;
19import java.util.Map;
20
21import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
22import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
23
24/**
25 * TODO comment
26 *
27 * @version $Revision: $ $Date: 16.07.2012$
28 * @author 2012, last modified by $Author: pharms$
29 */
30public class UsabilityEvaluationResult {
31   
32    /** */
33    private ITaskModel taskModel;
34   
35    /** */
36    private List<UsabilitySmell> smells = new ArrayList<UsabilitySmell>();
37
38    /**
39     *
40     */
41    public UsabilityEvaluationResult(ITaskModel taskModel) {
42        this.taskModel = taskModel;
43    }
44
45    /**
46     *
47     */
48    public UsabilityEvaluationResult(ITaskModel                      taskModel,
49                                     List<UsabilityEvaluationResult> results)
50    {
51        this.taskModel = taskModel;
52        for (UsabilityEvaluationResult result : results) {
53            for (UsabilitySmell smell : result.getAllSmells()) {
54                smells.add(smell);
55            }
56        }
57    }
58
59    /**
60     *
61     */
62    public void addSmell(UsabilitySmellIntensity   intensity,
63                         UsabilitySmellDescription description,
64                         Map<String, Object>       parameters)
65    {
66        addSmell(null, intensity, description, parameters);
67    }
68
69    /**
70     *
71     */
72    public void addSmell(ITask                     smellingTask,
73                         UsabilitySmellIntensity   intensity,
74                         UsabilitySmellDescription description,
75                         Map<String, Object>       parameters)
76    {
77        smells.add(new UsabilitySmell(smellingTask, intensity, description, parameters));
78    }
79
80    /**
81     *
82     */
83    public List<UsabilitySmell> getAllSmells() {
84        return smells;
85    }
86
87    /**
88     * @return the taskModel
89     */
90    public ITaskModel getTaskModel() {
91        return taskModel;
92    }
93
94}
Note: See TracBrowser for help on using the repository browser.