public static String min ( String ... values ) { BigDecimal bd ; BigDecimal bd2 ; try { int start = 0 ; while ( values [ start ] == null ) { start ++ ; } bd = new BigDecimal ( values [ start ] ) ; for ( int i = start + 1 ; i < values . length ; i ++ ) { if ( values [ i ] == null ) { continue ; } bd2 = new BigDecimal ( values [ i ] ) ; if ( bd . compareTo ( bd2 ) > 0 ) { bd = bd2 ; } } return bd . toString ( ) ; } catch ( Exception e ) { return null ; } }
Returns the minimum number from a group of input value .