Java Utililty Methods Integer Between

List of utility methods to do Integer Between

Description

The list of methods to do Integer Between are organized into topic(s).

Method

booleanbetween(int column, int line, int startCol, int startLine, int endCol, int endLine)
between
if (line < startLine || line > endLine) {
    return false;
if (line == startLine && column < startCol) {
    return false;
if (line == endLine && column > endCol) {
    return false;
...
booleanbetween(int coord, int limit)
between
return (coord >= 0) && (coord < limit);
booleanbetween(int floor, int x, int ceiling)
between
return (floor < x) && (x < ceiling);
intbetween(int number, int from, int to)
between
return (number >> from) & ((1 << to - from) - 1);
booleanbetween(int value, int lower, int upper)
between
return (value >= lower) && (value <= upper);
booleanbetween(int value, int min, int max)
Checks if value is (inclusively) between min and max.
return value >= min && value <= max;
intbetween(int value, int min, int max)
Return min if valuemax and value otherwise.
return Math.max(Math.min(max, value), min);
booleanbetween(int x, int a, int b)
Check whether x is in interval [a, b]
return x >= a && x <= b;