/** @return the current Array, so that chained calls on a specific Array instance can be done */ public Array increment(Period period, long value) { this.values[period.getIndex() - 1].increment(value); return this; }
private void assertVariation(Component component, String metricKey, int variation) { Measure newMeasure = measureRepository.getRawMeasure(component, metricRepository.getByKey(metricKey)).get(); assertThat(newMeasure.getVariations().getVariation(PERIOD.getIndex())).isEqualTo(variation); assertThat(newMeasure.getVariations().hasVariation(PERIOD.getIndex() + 1)).isFalse(); }
public LongVariationValue get(Period period) { return values[period.getIndex() - 1]; }