本文整理了Java中org.babyfish.lang.Arguments.mustBeLessThanOrEqualToOther()
方法的一些代码示例,展示了Arguments.mustBeLessThanOrEqualToOther()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Arguments.mustBeLessThanOrEqualToOther()
方法的具体详情如下:
包路径:org.babyfish.lang.Arguments
类名称:Arguments
方法名:mustBeLessThanOrEqualToOther
暂无
代码示例来源:origin: babyfish-ct/babyfish
@SuppressWarnings({ "unchecked", "rawtypes" })
public static <T> T mustBeLessThanOrEqualToOther(
String parameterName,
T argument,
String maximumParameterName,
T maximumValue,
Comparator<? super T> comparator) {
if (comparator == null) {
return (T)mustBeLessThanOrEqualToOther(
parameterName,
(Comparable)argument,
maximumParameterName,
(Comparable)maximumValue);
}
if (argument != null && maximumValue != null && comparator.compare(argument, maximumValue) > 0) {
throw new IllegalArgumentException(
mustBeGreaterThanOtherMessage(parameterName, maximumParameterName));
}
return argument;
}
代码示例来源:origin: babyfish-ct/babyfish
public static LazyBehaviorProcessor of(int rowLimit, int countLimit) {
Arguments.mustBeGreaterThanOrEqualToValue("rowLimit", rowLimit, 0);
Arguments.mustBeGreaterThanOrEqualToValue("countLimit", rowLimit, 0);
Arguments.mustBeLessThanOrEqualToOther("countLimit", countLimit, "rowLimit", rowLimit);
if (rowLimit == 0 && countLimit == 0) {
return DISABLED;
}
return new Normal(rowLimit, countLimit);
}
内容来源于网络,如有侵权,请联系作者删除!