view flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/StaticSedimentLoadCacheKey.java @ 4387:3ae698d1185d

ExtremeWQCurveGenerator: Use real facet description as name for data series of extreme wqs.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 02 Nov 2012 14:32:48 +0100
parents 3051bc28ac43
children 6a65e7ef43c0
line wrap: on
line source
package de.intevation.flys.artifacts.model;

import java.util.Date;

import org.apache.commons.lang.builder.HashCodeBuilder;


public class StaticSedimentLoadCacheKey
{
    public static final String CACHE_NAME = "sedimentload-value-table-static";

    private String river;
    private double startKm;
    private double endKm;
    private Date date;

    public StaticSedimentLoadCacheKey(
        String river,
        double startKm,
        double endKm,
        Date date
    ) {
        this.river = river;
        this.startKm = startKm;
        this.endKm = endKm;
        this.date = date;
    }

    public int hashCode() {
        HashCodeBuilder builder = new HashCodeBuilder();
        builder.append(river);
        builder.append(startKm);
        builder.append(endKm);
        builder.append(date);
        return builder.toHashCode();
    }

    public boolean equals(Object other) {
        if (!(other instanceof StaticBedHeightCacheKey)) {
            return false;
        }
        StaticSedimentLoadCacheKey o = (StaticSedimentLoadCacheKey) other;
        return this.river == o.river &&
            this.startKm == o.startKm &&
            this.endKm == o.endKm &&
            this.date == o.date;
    }
}

http://dive4elements.wald.intevation.org