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

intmin(int x, int y)
Get minimum of two given values
return (x < y) ? x : y;
intmin(Integer a, Integer b)
Min.
return Math.min(a, b);
Integermin(Integer i1, Integer i2)
Returns the smaller of the two Integers.
if (i1 != null && i2 != null)
    return min(i1.intValue(), i2.intValue());
return null;
longmin(long m, long n)
min
return m <= n ? m : n;
longmin(long x, long y)
min
return x <= y ? x : y;
Numbermin(Number a, Number b)
Returns the lesser of the two given numbers.
return (a.doubleValue() < b.doubleValue()) ? a : b;
Numbermin(Number n0, Number n1)
Returns the minimum (double) of the given values.

If either value is null, then the other value will be returned.
if (n0 == null) {
    return n1;
if (n1 == null) {
    return n0;
double d0 = n0.doubleValue();
double d1 = n1.doubleValue();
...
Numbermin(Number num1, Number num2)
min
return (num1.doubleValue() > num2.doubleValue()) ? num2 : num1;
intMin(Object in)
Min
int out = Integer.MAX_VALUE;
if (in == null)
    return 0;
if (in instanceof int[]) {
    int[] inn = (int[]) in;
    for (int i = 0, s = inn.length; i < s; i++)
        out = Min(out, inn[i]);
    return out;
...
Numbermin(Object o1, Object o2)
min
Number n1 = getValue(o1);
Number n2 = getValue(o2);
if (n1 == null)
    return n2;
if (n2 == null)
    return n1;
if (n1.doubleValue() < n2.doubleValue())
    return n1;
...