teichmann@5863: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5863: * Software engineering by Intevation GmbH teichmann@5863: * teichmann@5863: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5863: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5863: * documentation coming with Dive4Elements River for details. teichmann@5863: */ teichmann@5863: teichmann@5831: package org.dive4elements.river.artifacts.model.map; rrenkert@5307: rrenkert@5307: rrenkert@5307: public class StaticHWSCacheKey rrenkert@5307: { rrenkert@5307: public static final String CACHE_NAME = "hws-value-table-static"; rrenkert@5307: rrenkert@5307: private String river; rrenkert@5307: private int type; teichmann@5314: rrenkert@5307: public StaticHWSCacheKey(String river, int type) { rrenkert@5307: this.river = river; rrenkert@5307: this.type = type; rrenkert@5307: } rrenkert@5307: rrenkert@5307: public int hashCode() { rrenkert@5307: return river.hashCode() | (type << 8); rrenkert@5307: } rrenkert@5307: rrenkert@5307: public boolean equals(Object other) { rrenkert@5307: if (!(other instanceof StaticHWSCacheKey)) { rrenkert@5307: return false; rrenkert@5307: } rrenkert@5307: StaticHWSCacheKey o = (StaticHWSCacheKey) other; rrenkert@5307: return this.river == o.river; rrenkert@5307: } rrenkert@5307: }