view artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthCalculationResults.java @ 9365:ba1e2e8f05d1

sinfo.flowdepth Results.isShowRefGauge==false->spalte ausblenden; result.isShowRefGauge==false&&results.isShowRefGauge==true->result.refGauge=""
author gernotbelger
date Thu, 02 Aug 2018 15:02:27 +0200
parents 0c8f170945d7
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.flowdepth;

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 FlowDepthCalculationResults extends AbstractCalculationResults<FlowDepthCalculationResult> {

    private static final long serialVersionUID = 1L;

    private final boolean useTkh;

    public FlowDepthCalculationResults(final String calcModeLabel, final String user, final RiverInfo river, final DoubleRange calcRange,
            final boolean useTkh) {
        super(calcModeLabel, user, river, calcRange);

        this.useTkh = useTkh;
    }

    public boolean isUseTkh() {
        return this.useTkh;
    }

    public boolean hasTkh() {
        for (final FlowDepthCalculationResult result : getResults()) {
            if (result.hasTkh())
                return true;
        }

        return false;
    }

    public boolean isShowRefGauges() {
        for (final FlowDepthCalculationResult result : getResults()) {
            if (result.isShowRefGauges())
                return true;
        }

        return false;
    }
}

http://dive4elements.wald.intevation.org