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

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

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

Arguments.mustBetweenValue介绍

暂无

代码示例

代码示例来源:origin: babyfish-ct/babyfish

public ArrayElements(
    BidiType bidiType,
    Object comparatorOrEqualityComparatorOrUnifiedComparator,
    int initCapacity, 
    float expandFactor, 
    Float collapseFactor) {
  super(bidiType, comparatorOrEqualityComparatorOrUnifiedComparator);
  Arguments.mustBeGreaterThanOrEqualToValue("initCapacity", initCapacity, 0);
  Arguments.mustBetweenValue("expandFactory", expandFactor, 1, true, 4, true);
  if (collapseFactor != null) {
    float factor = collapseFactor.floatValue();
    Arguments.mustBetweenValue("expandFactory", factor, 0.1F, true, 0.9F, true);
  }
  if (initCapacity != 0) {
    this.data = new Object[initCapacity];
  }
}

代码示例来源:origin: babyfish-ct/babyfish

return (T)mustBetweenValue(
    parameterName,
    (Comparable)argument,

代码示例来源:origin: babyfish-ct/babyfish

private void validateParts(ComparatorPart[] parts) {
  Arguments.mustNotContainNullElements(
      "parts", 
      Arguments.mustNotBeEmpty(
          "parts", 
          Arguments.mustNotBeNull("parts", parts)
      )
  );
  for (int i = parts.length - 1; i >= 0; i--) {
    Arguments.mustBetweenValue(
        "parts[" + i + "]scalarPropertyId", 
        parts[i].getScalarPropertyId(), 
        0, 
        true, 
        this.propertyArray.length, 
        false
    );
  }
}

相关文章