本文整理了Java中org.babyfish.lang.Arguments.mustBeGreaterThanValue()
方法的一些代码示例,展示了Arguments.mustBeGreaterThanValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Arguments.mustBeGreaterThanValue()
方法的具体详情如下:
包路径:org.babyfish.lang.Arguments
类名称:Arguments
方法名:mustBeGreaterThanValue
暂无
代码示例来源:origin: babyfish-ct/babyfish
public MaxComplexAbsValidator(double maxAbs, StringBuilder builder) {
this.maxAbs = Arguments.mustBeGreaterThanValue("maxAbs", maxAbs, 0);
this.builder = builder;
}
代码示例来源:origin: babyfish-ct/babyfish
@SuppressWarnings({ "unchecked", "rawtypes" })
public static <T> T mustBeGreaterThanValue(
String parameterName,
T argument,
T minimumValue,
Comparator<? super T> comparator) {
if (comparator == null) {
return (T)mustBeGreaterThanValue(parameterName, (Comparable)argument, (Comparable)minimumValue);
}
if (argument != null && minimumValue != null && comparator.compare(argument, minimumValue) <= 0) {
throw new IllegalArgumentException(
mustBeGreaterThanValueMessage(parameterName, minimumValue.toString()));
}
return argument;
}
代码示例来源:origin: babyfish-ct/babyfish
MaxLengthImpl(int maxLength) {
this.maxLength = Arguments.mustBeGreaterThanValue("maxLength", maxLength, 0);
}
代码示例来源:origin: babyfish-ct/babyfish
public PageBuilder(XTypedQuery<T> typedQuery, int pageIndex, int pageSize) {
this.typedQuery = Arguments.mustNotBeNull("typedQuery", typedQuery);
this.pageIndex = pageIndex;
this.pageSize = Arguments.mustBeGreaterThanValue("pageSize", pageSize, 0);
}
代码示例来源:origin: babyfish-ct/babyfish
Arguments.mustBeGreaterThanValue("loadFactor.floatValue()", loadFactor.floatValue(), 0);
this.threshold = (int)(initCapacity * loadFactor);
代码示例来源:origin: babyfish-ct/babyfish
public void setPrice(BigDecimal price) {
Arguments.mustBeGreaterThanValue(
"price",
Arguments.mustNotBeNull("price", price),
BigDecimal.ZERO
);
BigDecimal oldPrice = this.price;
if (Nulls.equals(oldPrice, price)) {
return;
}
this.price = price;
if (this.propertyChangedListener != null) {
this.propertyChangedListener.propertyChanged(
new PropertyChanagedEvent(this, "price", oldPrice, price)
);
}
}
内容来源于网络,如有侵权,请联系作者删除!