package ejb.slrData;


import java.io.*;



public class PKey implements Serializable {


    public String scenarioName;
    public int year;

    public PKey() {}



    public PKey(String scenarioName,int year) {

        this.scenarioName = scenarioName;
        this.year = year;

    } //public PKey(String scenarioName,int year)



    public String getScenarioName() {

        return scenarioName;

    } //public String getScenarioName()



    public int getYear() {

        return year;

    } //public int getYear()



    public boolean equals(Object o) {

        if(o instanceof PKey) {

            return (scenarioName.equals(((PKey)o).getScenarioName())
                        && (year == ((PKey)o).getYear()));

        } //if(o instanceof PKey)

        return false;

    } //public boolean equals(Object o)



    public int hashCode() {

        return scenarioName.hashCode()+year;

    } //public int hashCode()



    public String toString() {

        return scenarioName + "," + String.valueOf(year);

    } //public String toString()


} //public class PKey implements Serializable
