package de.ivu.elect.presentation.charts;

import java.io.Serializable;

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

  private final Number number;

  public BarChartData(Number number) {
    if (number == null) {
      this.number = 0L;
    } else {
      this.number = number;
    }
  }

  public double getValueAsDouble() {
    if (number == null) {
      return 0d;
    }
    return number.doubleValue();
  }

  public Number getNumber() {
    return number;
  }
}
