private RangeDistributionBuilder addLimitCount(Number limit, int count) { for (Number bottomLimit : bottomLimits) { if (NumberComparator.INSTANCE.compare(bottomLimit.doubleValue(), limit.doubleValue()) == 0) { addValue(limit, count); isEmpty = false; return this; } } isValid = false; return this; }
private static boolean greaterOrEqualsThan(Number n1, Number n2) { return NumberComparator.INSTANCE.compare(n1, n2) >= 0; }
private RangeDistributionBuilder addLimitCount(Number limit, int count) { for (Number bottomLimit : bottomLimits) { if (NumberComparator.INSTANCE.compare(bottomLimit.doubleValue(), limit.doubleValue()) == 0) { addValue(limit, count); isEmpty = false; return this; } } isValid = false; return this; }
private void changeDoublesToInts() { for (Number bottomLimit : bottomLimits) { if (NumberComparator.INSTANCE.compare(bottomLimit.intValue(), bottomLimit.doubleValue()) != 0) { // it's not only ints return; } } for (int i = 0; i < bottomLimits.length; i++) { bottomLimits[i] = bottomLimits[i].intValue(); } }
private static boolean greaterOrEqualsThan(Number n1, Number n2) { return NumberComparator.INSTANCE.compare(n1, n2) >= 0; }
private void changeDoublesToInts() { for (Number bottomLimit : bottomLimits) { if (NumberComparator.INSTANCE.compare(bottomLimit.intValue(), bottomLimit.doubleValue()) != 0) { // it's not only ints return; } } for (int i = 0; i < bottomLimits.length; i++) { bottomLimits[i] = bottomLimits[i].intValue(); } }