view artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/FlowDepthDevelopmentCalculationResults.java @ 9040:5294114b1df4

Fixed/changed some FIXMEs/TODOs
author gernotbelger
date Wed, 02 May 2018 12:19:31 +0200
parents c40db8e8dcae
children 23945061daec
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.sinfo.common.AbstractSInfoCalculationResults;
import org.dive4elements.river.artifacts.sinfo.util.RiverInfo;

/**
 * @author Gernot Belger
 */
final class FlowDepthDevelopmentCalculationResults extends AbstractSInfoCalculationResults<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