Java Utililty Methods Number Min Value

List of utility methods to do Number Min Value

Description

The list of methods to do Number Min Value are organized into topic(s).

Method

intminPos(int a, int b)
min Pos
if (a >= 0 && b >= 0) {
    return min(a, b);
} else if (a >= 0 && b < 0) {
    return a;
} else if (b >= 0 && a < 0) {
    return b;
} else {
    return Integer.MAX_VALUE;
...
IntegerminPositive(int a, int b)
Returns the minimum positive value of the two supplied, null if both are negative.
if (a < 0 && b < 0) {
    return null;
} else if (a < 0) {
    return b;
} else if (b < 0) {
    return a;
} else {
    return Math.min(a, b);
...
intminPower2(int n)
Find the minimal power of 2 that is larger than n.
int newn = 2;
while (newn < n)
    newn *= 2;
return newn;
intminRunLength(int n)
Returns the minimum acceptable run length for an array of the specified length.
if (DEBUG)
    assert n >= 0;
int r = 0; 
while (n >= MIN_MERGE) {
    r |= (n & 1);
    n >>= 1;
return n + r;
...
longminShareLifetime(long shareLifetime1, long shareLifetime2)
min Share Lifetime
if (shareLifetime1 == 0) {
    return shareLifetime2;
} else if (shareLifetime2 == 0) {
    return shareLifetime1;
} else {
    return Math.min(shareLifetime1, shareLifetime2);
intminSignedIntForBitSize(final int bitSize)
min Signed Int For Bit Size
checkBitSizeForSignedInt(bitSize);
return minSignedIntForBitSize_noCheck(bitSize);
intminSignedIntForBitSize_noCheck(final int bitSize)
min Signed Int For Bit Sizno Check
return Integer.MIN_VALUE >> 32 - bitSize;
booleanminSize(String str, int min, boolean nullCheck)
min Size
if (nullCheck == false || isRequired(str)) {
    if (str == null) {
        return true;
    int len = str.trim().getBytes().length;
    if (len >= min) {
        return true;
    } else {
...
floatminSPSForBandCode(String bandCode)
min SPS For Band Code
return minSPSForBandCode(bandCode.charAt(0));
longminToS(long s)
S to min long.
return (s * 60L);