下面列出了org.apache.commons.lang3.math.NumberUtils#min ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@Nullable
public Double min() {
if (items.isEmpty()) {
return null;
}
return NumberUtils.min(ArrayUtils.toPrimitive(items.toArray(new Double[items.size()])));
}
protected Integer getCount(View view, Integer count) {
Integer viewCount = view.getCount();
Integer wiCount = ((count == null) || (count < 1) || (count > View.MAX_COUNT)) ? View.MAX_COUNT : count;
return NumberUtils.min(viewCount, wiCount);
}
protected Integer getCount(View view, Integer count) {
Integer viewCount = view.getCount();
Integer wiCount = ((count == null) || (count < 1) || (count > View.MAX_COUNT)) ? View.MAX_COUNT : count;
return NumberUtils.min(viewCount, wiCount);
}
@Test
public void find_min_value_in_array_with_apache_commons () {
int lowest = NumberUtils.min(numbers);
assertEquals(1, lowest);
}