Java tutorial
/* * Copyright (C) 2016 jcastro * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package delfos.group.results.groupevaluationmeasures; import delfos.results.evaluationmeasures.EvaluationMeasure; import org.jdom2.Element; /** * Almacena los resultados de una mtrica de evaluacin * * @author jcastro-inf ( https://github.com/jcastro-inf ) * @version 1.0 (28 Octubre 2012) */ public class GroupEvaluationMeasureResult { private final double value; private final GroupEvaluationMeasure groupEvaluationMeasure; public GroupEvaluationMeasureResult(GroupEvaluationMeasure groupEvaluationMeasure, double value) { this.groupEvaluationMeasure = groupEvaluationMeasure; this.value = value; } public Element getXMLElement() { Element measureElement = new Element(groupEvaluationMeasure.getAlias()); measureElement.setAttribute(EvaluationMeasure.VALUE_ATTRIBUTE_NAME, Double.toString(value)); return measureElement; } public double getValue() { return value; } public GroupEvaluationMeasure getGroupEvaluationMeasure() { return groupEvaluationMeasure; } @Override public String toString() { return groupEvaluationMeasure.getName() + " : " + getValue(); } }