[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 | import java.io.Serializable; |
---|
| 18 | |
---|
| 19 | /** |
---|
[1191] | 20 | * <p> |
---|
[1423] | 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. |
---|
[1191] | 23 | * </p> |
---|
[1146] | 24 | * |
---|
[1191] | 25 | * @author Patrick Harms |
---|
[1146] | 26 | */ |
---|
| 27 | public interface ITaskInfo extends Serializable { |
---|
| 28 | |
---|
| 29 | /** |
---|
[1191] | 30 | * <p> |
---|
| 31 | * returns the task to which these infos belong |
---|
| 32 | * </p> |
---|
[1146] | 33 | * |
---|
[1191] | 34 | * @return as described |
---|
[1146] | 35 | */ |
---|
| 36 | public ITask getTask(); |
---|
| 37 | |
---|
[1287] | 38 | /** |
---|
| 39 | * <p> |
---|
[1423] | 40 | * returns all available measures |
---|
[1287] | 41 | * </p> |
---|
| 42 | * |
---|
| 43 | * @return as described |
---|
| 44 | */ |
---|
[1423] | 45 | public IMeasure[] getMeasures(); |
---|
[1287] | 46 | |
---|
[1423] | 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 | |
---|
[1146] | 111 | } |
---|