@Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    Cost other = (Cost) obj;
    if (periods == null) {
      if (other.periods != null)
        return false;
    } else if (!periods.equals(other.periods))
      return false;
    if (readings == null) {
      if (other.readings != null)
        return false;
    } else if (!readings.equals(other.readings))
      return false;
    return true;
  }