Creates a filter using the isBetween predicate.
@param min min value inclusive, not null.
@param max max value inclusive, not null.
@return the Predicate between min and max.
546645
public static Predicate<MonetaryAmount> isBetween(MonetaryAmount min, MonetaryAmount max){
        return isLessThanOrEqualTo(max).and(isGreaterThanOrEqualTo(min));
    }
389296
public static Between betweenExclusiveMax( String property, int minimum, int maximum)
    {
    return new Between( notLessThan( property, minimum), lessThan( property, maximum));
    }
136954
private QueryBuilder populateBetweenFilter(BetweenExpression betweenExpression, EntityMetadata m)
    {
        String lowerBoundExpression = getBetweenBoundaryValues(betweenExpression.getLowerBoundExpression());
        String upperBoundExpression = getBetweenBoundaryValues(betweenExpression.getUpperBoundExpression());
        String field = getField(betweenExpression.getExpression().toParsedText());

        log.debug("Between clause for field " + field + "with lower bound " + lowerBoundExpression + "and upper bound "
                + upperBoundExpression);

        return new AndQueryBuilder(getFilter(kunderaQuery.new FilterClause(field, Expression.GREATER_THAN_OR_EQUAL,
                lowerBoundExpression, field), m), getFilter(kunderaQuery.new FilterClause(field,
                Expression.LOWER_THAN_OR_EQUAL, upperBoundExpression,field), m));
    }
32030
public static ByteRangeRandomizer aNewByteRangeRandomizer(final Byte min, final Byte max, final long seed) {
        return new ByteRangeRandomizer(min, max, seed);
    }
1112950
public static boolean isBetween(double value, double min, double max)
    {
        return Double.compare(value, min) >= 0 && Double.compare(value, max) <= 0;
    }
488228
public static float restrict(float value, float minValue, float maxValue) {
        return Math.max(minValue, Math.min(value, maxValue));
    }
784043
public static function range($value, $min, $max): int
    {
        $value = Filter::int($value);
        $min = Filter::int($min);
        $max = Filter::int($max);

        return Vars::limit($value, $min, $max);
    }
428236
public void setMinMax(double min, double max)
    {
        if(min <= 0 || Double.isNaN(min) || Double.isInfinite(min))
            throw new IllegalArgumentException("min value must be positive, not " + min);
        else if(min >= max || Double.isNaN(max) || Double.isInfinite(max))
            throw new IllegalArgumentException("max (" + max + ") must be larger than min (" + min+")" );
        this.max = max;
        this.min = min;
        this.logMax = Math.log(max);
        this.logMin = Math.log(min);
        this.logDiff = logMax-logMin;
        this.diff = max-min;
    }
929153
public final Parser<Void> skipTimes(int min, int max) {
    Checks.checkMinMax(min, max);
    return new SkipTimesParser(this, min, max);
  }
651017
private static void checkPreconditions(final int min, final int max) {
        if( min > max ) {
            throw new IllegalArgumentException(String.format("max (%d) should not be < min (%d)", max, min));
        }
        
        if( min < 0 ) {
            throw new IllegalArgumentException(String.format("min length (%d) should not be < 0", min));
        }
    }
995974
public Regex range(int min, int max) {
      return re(this.pattern + "{" + Integer.toString(min) + "," + Integer.toString(max) + "}");
   }
1363388
public static Between between( String property, int minimum, int maximum)
    {
    return new Between( notLessThan( property, minimum), notMoreThan( property, maximum));
    }
1284050
public function vBetween(Int $min = 0, Int $max = 0)
    {
        return $this->setJavascriptValidation
        (
            'ZNValidationBetween', 
            ['betweenBoth' => [':p1' => $min, ':p2' => $max]],
            ['betweenBoth' => [$min, $max]],
            [$min, $max]  
        );
    }
372127
public static BigDecimalRangeRandomizer aNewBigDecimalRangeRandomizer(final Double min, final Double max, final long seed) {
        return new BigDecimalRangeRandomizer(min, max, seed);
    }
59094
public static int randomIntBetween(int min, int max) {
    Random rand = new Random();
    return rand.nextInt((max - min) + 1) + min;
  }
198900
public static <T extends Comparable<T>> Predicate<T> between(
      final T low, final T high) {
    return new Predicate<T>() {
      @Override
      public boolean apply(T obj) {
        return obj != null
            && (low == null || obj.compareTo(low) >= 0)
            && (high == null || obj.compareTo(high) < 0);
      }
    };
  }
201840
public static Pattern times(final int min, final int max, final CharPredicate predicate) {
    Checks.checkMinMax(min, max);
    return new Pattern() {
      @Override
      public int match(CharSequence src, int begin, int end) {
        int minLen = RepeatCharPredicatePattern.matchRepeat(min, predicate, src, end, begin, 0);
        if (minLen == MISMATCH)
          return MISMATCH;
        return matchSome(max - min, predicate, src, end, begin + minLen, minLen);
      }
    };
  }