private void addValue(Number value, int count) { for (int i = bottomLimits.length - 1; i >= 0; i--) { if (greaterOrEqualsThan(value, bottomLimits[i])) { this.distributionSet.add(bottomLimits[i], count); return; } } }
/** * Increments an entry * * @param value the value to use to pick the entry to increment * @param count the number by which to increment */ public RangeDistributionBuilder add(Number value, int count) { if (greaterOrEqualsThan(value, bottomLimits[0])) { addValue(value, count); isEmpty = false; } return this; }
private void addValue(Number value, int count) { for (int i = bottomLimits.length - 1; i >= 0; i--) { if (greaterOrEqualsThan(value, bottomLimits[i])) { this.distributionSet.add(bottomLimits[i], count); return; } } }
/** * Increments an entry * * @param value the value to use to pick the entry to increment * @param count the number by which to increment */ public RangeDistributionBuilder add(Number value, int count) { if (greaterOrEqualsThan(value, bottomLimits[0])) { addValue(value, count); isEmpty = false; } return this; }