@Test public void testDiscardsBuckets() throws Exception { BucketedCounter counter = new BucketedCounter(); counter.add(100); counter.setBucketIdProvider(bucketIdProvider); counter.add(1); assertPreviousCount(counter, 0); ++bucketIdProvider.id; counter.add(2); counter.add(2.2); assertPreviousCount(counter, 1); ++bucketIdProvider.id; ++bucketIdProvider.id; counter.add(100); assertPreviousCount(counter, 0); ++bucketIdProvider.id; assertPreviousCount(counter, 100); counter.add(200); ++bucketIdProvider.id; ++bucketIdProvider.id; assertPreviousCount(counter, 0); }
public void add(long count) { add((double) count); }
BucketedCounter extends Bucketed<Counter> { public void add(long count) { add((double) count); } }
BucketedCounter extends Bucketed<Counter> { public void add(long count) { add((double) count); }  }
BucketedCounter extends Bucketed<Counter> { public void add(long count) { add((double) count); }  void add(long count); void add(final double count); }
BucketedCounter extends Bucketed<Counter> { public void add(long count) { add((double) count); }  void add(long count); void add(final double count);  }