/* * [CostLocItem.java] * * Summary: Describes an Location and the cost of electricity there. * * Copyright: (c) 2010-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.0 2010-12-02 initial version. * 1.1 2010-12-06 add duty cycle. */ package com.mindprod.powcost; import java.io.Serializable; /** * Describes an Location and the cost of electricity there. * * @author Roedy Green, Canadian Mind Products * @version 1.1 2010-12-06 add duty cycle.. * @since 2010-12-02 */ public class CostLocItem implements Serializable { /** * Defining a layout version for a class. Watch the spelling and keywords! */ private static final long serialVersionUID = 1L; private final String countryAbbr; private final String currencyAbbr; /** * description of location */ private final String locationDescription; private final String stateAbbr; /** * cost per kwh in dollars */ private final double costPerKwh; public CostLocItem( final String countryAbbr, final String stateAbbr, final String locationDescription, final double costPerKwh, final String currencyAbbr ) { this.countryAbbr = countryAbbr; this.stateAbbr = stateAbbr; this.locationDescription = locationDescription; this.costPerKwh = costPerKwh; this.currencyAbbr = currencyAbbr; } public double getCostPerKwh() { return costPerKwh; } public String getCountryAbbr() { return countryAbbr; } public String getCurrencyAbbr() { return currencyAbbr; } public String getLocationDescription() { return locationDescription; } public String getStateAbbr() { return stateAbbr; } /** * for use in JCheckBox */ public String toString() { return countryAbbr + " " + stateAbbr + " " + locationDescription; } }