public String toString() { final StringBuilder sb = new StringBuilder(); for (final Statistic m : Statistic.values()) { sb.append(m.toString()); sb.append("="); sb.append(statsCurrent.getStatistic(m)); sb.append(", "); } if (sb.length() > 2) { sb.delete(sb.length() - 2, sb.length()); } return sb.toString(); }
/** * The statistic for the metric. * * @param statistic The statistic for the metric. * @return Returns a reference to this object so that method calls can be chained together. * @see Statistic */ public void setStatistic(Statistic statistic) { this.statistic = statistic.toString(); }