package usda.weru.gis.data;

/**
 *
 * @author Joseph Levin <joelevin@weru.ksu.edu>
 */
public class SoilMapUnit {

    private final String c_areasymbol;
    private final long c_mukey;
    private final long c_musym;

    /**
     *
     * @param areasymbol
     * @param mukey
     * @param musym
     */
    public SoilMapUnit(String areasymbol, long mukey, long musym) {
        c_areasymbol = areasymbol;
        c_mukey = mukey;
        c_musym = musym;
    }

    /**
     *
     * @return
     */
    public String getAreaSymbol() {
        return c_areasymbol;
    }

    /**
     *
     * @return
     */
    public long getMukey() {
        return c_mukey;
    }

    /**
     *
     * @return
     */
    public long getMusym() {
        return c_musym;
    }

    /**
     *
     * @param obj
     * @return
     */
    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final SoilMapUnit other = (SoilMapUnit) obj;
        if (this.c_mukey != other.c_mukey) {
            return false;
        }
        return true;
    }

    /**
     *
     * @return
     */
    @Override
    public int hashCode() {
        int hash = 5;
        hash = 67 * hash + (int) (this.c_mukey ^ (this.c_mukey >>> 32));
        return hash;
    }

    /**
     *
     * @return
     */
    @Override
    public String toString() {
        return c_areasymbol + ":" + c_musym;
    }

}
