package de.ivu.elect.business.system.entity;

import de.ivu.elect.jee.performance.ViewAccessTargetStatistics;

public enum PerformanceStatistikZeitDarstellung {

  DURCHSCHNITTLICH {
    @Override
    public String getMsgKey() {
      return "performance.statistics.unit.time.average";
    }

    @Override
    public Number getValue(ViewAccessTargetStatistics entry) {
      return entry.getAverage();
    }
  },
  GESAMT {
    @Override
    public String getMsgKey() {
      return "performance.statistics.unit.time.total";
    }

    @Override
    public Number getValue(ViewAccessTargetStatistics entry) {
      return entry.getTimeTotal();
    }
  };

  public abstract String getMsgKey();

  public abstract Number getValue(ViewAccessTargetStatistics entry);
}
