view artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/FlowDepthDevelopmentCalculationResults.java @ 9195:a4121ec450d6

'ca.'-issue ExportContextCSV+PDF separated uinfo.inundationduration url export
author gernotbelger
date Fri, 29 Jun 2018 14:52:54 +0200
parents 9b2e46090099
children
line wrap: on
line source
/** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
 * Software engineering by
 *  Björnsen Beratende Ingenieure GmbH
 *  Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
 *
 * This file is Free Software under the GNU AGPL (>=v3)
 * and comes with ABSOLUTELY NO WARRANTY! Check out the
 * documentation coming with Dive4Elements River for details.
 */
package org.dive4elements.river.artifacts.sinfo.flowdepthdev;

import java.util.List;

import org.apache.commons.lang.math.DoubleRange;
import org.dive4elements.river.artifacts.common.AbstractCalculationResults;
import org.dive4elements.river.artifacts.sinfo.util.RiverInfo;

/**
 * @author Gernot Belger
 */
final class FlowDepthDevelopmentCalculationResults extends AbstractCalculationResults<FlowDepthDevelopmentCalculationResult> {

    private static final long serialVersionUID = 1L;

    public FlowDepthDevelopmentCalculationResults(final String calcModeLabel, final String user, final RiverInfo river, final DoubleRange calcRange) {
        super(calcModeLabel, user, river, calcRange);
    }

    /**
     * We know that this type of results only has one result member, so we can directly access it.
     */
    public FlowDepthDevelopmentCalculationResult getResult() {
        final List<FlowDepthDevelopmentCalculationResult> results = getResults();
        if (results.size() < 1)
            return null;

        return results.get(0);
    }
}

http://dive4elements.wald.intevation.org