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