org.babyfish.lang.Arguments.mustBeGreaterThanValue()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(153)

本文整理了Java中org.babyfish.lang.Arguments.mustBeGreaterThanValue()方法的一些代码示例,展示了Arguments.mustBeGreaterThanValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Arguments.mustBeGreaterThanValue()方法的具体详情如下:
包路径:org.babyfish.lang.Arguments
类名称:Arguments
方法名:mustBeGreaterThanValue

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)
    );
  }
}

相关文章