//==============================================================================
//The Society of Actuaries (SOA) makes this computer model and its computer
//code available to its members for educational purposes. The model and its
//code may be modified and redistributed without prior authorization from the
//SOA. The SOA distributes this computer model and its computer code in the
//hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
//implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
//PURPOSE.
//==============================================================================

package resources;

public class Premium implements Comparable<Premium>
{
    int insurancePlanIndex;
    double premiumAmount;

//==============================================================================
// Methods:  getter and setter methods
//==============================================================================

    public int getInsurancePlanIndex()
    {
        return insurancePlanIndex;
    }

    public void setInsurancePlanIndex(int insurancePlanIndex)
    {
        this.insurancePlanIndex = insurancePlanIndex;
    }

    public double getPremiumAmount()
    {
        return premiumAmount;
    }

    public void setPremiumAmount(double premiumAmount)
    {
        this.premiumAmount = premiumAmount;
    }

    @Override
    public int compareTo(Premium premium2)
    {
        if (premiumAmount < premium2.getPremiumAmount()) return 1;
        else if (premiumAmount > premium2.getPremiumAmount()) return -1;
        else return 0;
    }

//==============================================================================

}//end Premium class
