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

Stringmin(String a, String b)
min
if (a == null && b == null) {
    return null;
if (a != null && b == null) {
    return a;
if (b != null && a == null) {
    return b;
...
Stringmin(String a, String b)
min
String[] as = a.split(":");
String[] bs = b.split(":");
if (as.length < bs.length) {
    return a;
} else if (as.length > bs.length) {
    return b;
Integer al = toInt(as, 0);
...
Stringmin(String in, int len)
min
return min(in, len, ' ');
Stringmin(String name)
_more_
return " min(" + validName(name) + ")";
Stringmin(String s)
String demotion - returns either the given string or null (if given string length is zero).
return s != null && s.length() == 0 ? null : s;
Tmin(T a, T b)
Generalized version of Math.min
if (a.compareTo(b) <= 0)
    return a;
return b;
Tmin(T a, T b)
Compares two objects finding the minimum.
if (a != null && b != null) {
    return a.compareTo(b) <= 0 ? a : b;
if (a == null) {
    if (b == null) {
        return null;
    } else {
        return b;
...
Tmin(T c1, T c2)
Gets minimal value between given two.
if (c1 == c2)
    return c1;
if (c1 == null)
    return c1;
if (c2 == null)
    return c2;
return c1.compareTo(c2) <= 0 ? c1 : c2;
Tmin(T v1, T v2)
min
return v1.compareTo(v2) > 0 ? v2 : v1;
Tmin(T v1, T v2, int nullSupport)
min
if (v1 == v2)
    return v1;
if (v1 == null) {
    return nullSupport == NULL_IS_MINIMUM ? v1 : v2;
if (v2 == null) {
    return nullSupport == NULL_IS_MINIMUM ? v2 : v1;
int v = v1.compareTo(v2);
return (v > 0) ? v2 : v1;