source: trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInfo.java @ 1423

Last change on this file since 1423 was 1423, checked in by pharms, 10 years ago
  • added possibility to calculate metrics for tasks and added the first metrics
File size: 2.9 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.tasktrees.treeifc;
16
17import java.io.Serializable;
18
19/**
20 * <p>
21 * Provides extended information about a specific task, such as statistics about task occurrences,
22 * etc. It contains measures for different metrics determined for a task.
23 * </p>
24 *
25 * @author Patrick Harms
26 */
27public interface ITaskInfo extends Serializable {
28
29    /**
30     * <p>
31     * returns the task to which these infos belong
32     * </p>
33     *
34     * @return as described
35     */
36    public ITask getTask();
37
38    /**
39     * <p>
40     * returns all available measures
41     * </p>
42     *
43     * @return as described
44     */
45    public IMeasure[] getMeasures();
46
47    /**
48     * <p>
49     * returns the value of the measure identified through the given metric
50     * </p>
51     *
52     * @param metric the metric for which the value is to be returned
53     *
54     * @return as described
55     */
56    public int getMeasureValue(TaskMetric metric);
57
58    /**
59     * <p>
60     * returns the value of the measure identified through the given metric if the task is
61     * observed in the given context, i.e. parent task. The result is Integer.MIN_VALUE if there
62     * is no value for this measure in a context.
63     * </p>
64     *
65     * @param metric  the metric for which the value is to be returned
66     * @param context the context for which the measure value is to be returned
67     *
68     * @return as described
69     */
70    public int getMeasureValue(TaskMetric metric, ITask context);
71
72    /**
73     * <p>
74     * represents a measure for a specific metric
75     * </p>
76     *
77     * @author Patrick Harms
78     */
79    public interface IMeasure {
80       
81        /**
82         * <p>
83         * returns the metric of the measure
84         * </p>
85         *
86         * @return as described
87         */
88        public TaskMetric getMetric();
89       
90        /**
91         * <p>
92         * returns the value of the measure
93         * </p>
94         *
95         * @return as described
96         */
97        public int getValue();
98       
99        /**
100         * <p>
101         * returns the value of the measure if the task was observed in a specific context, i.e.
102         * parent task
103         * </p>
104         *
105         * @return as described
106         */
107        public int getValue(ITask context);
108       
109    }
110
111}
Note: See TracBrowser for help on using the repository browser.