view flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedQualityDiameterResult.java @ 4187:21f4e4b79121

Refactor GaugeDischargeCurveFacet to be able to set a facet name For adding another output of the GaugeDischargeCurveArtifact it is necessary to provide to facet instances with different names. Therefore the GaugeDischargeCurveFacet is extended to set the facet name in the constructor.
author Björn Ricks <bjoern.ricks@intevation.de>
date Fri, 19 Oct 2012 13:25:49 +0200
parents 9f9d5ada96ca
children
line wrap: on
line source
package de.intevation.flys.artifacts.model.minfo;

import gnu.trove.TDoubleArrayList;

import java.io.Serializable;

public class BedQualityDiameterResult implements Serializable {

    public static enum DIAMETER_TYPE {
        D90,
        D84,
        D80,
        D75,
        D70,
        D60,
        D50,
        D40,
        D30,
        D25,
        D20,
        D16,
        D10,
        DMIN,
        DMAX
    }

    protected DIAMETER_TYPE type;
    protected TDoubleArrayList kms;
    protected boolean empty;

    public BedQualityDiameterResult () {
        empty = true;
    }

    public BedQualityDiameterResult (
        String type,
        TDoubleArrayList km
    ) {
        if (km.size() > 0) {
            empty = false;
        }
        this.type = DIAMETER_TYPE.valueOf(type.toUpperCase());
        this.kms = km;
    }

    public DIAMETER_TYPE getType() {
        return this.type;
    }

    public TDoubleArrayList getKms() {
        return this.kms;
    }

    public void setType(DIAMETER_TYPE type) {
        this.type = type;
    }

    public boolean isEmpty() {
        return empty;
    }
}

http://dive4elements.wald.intevation.org