package de.ivu.elect.presentation.charts;

import java.io.Serializable;

/**
 *  on 29.04.2015.
 */
public class BarChartEntry implements Serializable {

  private final String label;

  private final String color;

  BarChartEntry(String label, String color) {
    this.label = label;
    this.color = color;
  }

  public String getColor() {
    return color;
  }

  public String getLabel() {
    return label;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    BarChartEntry that = (BarChartEntry) o;

    return label.equals(that.label);

  }

  @Override
  public int hashCode() {
    return label.hashCode();
  }
}
