public static Optional<Number> min( List<Object> args ) {
        if(args == null || args.size() == 0) {
            return Optional.empty();
        }
        Integer minInt = Integer.MAX_VALUE;
        Double minDouble = Double.MAX_VALUE;
        Long minLong = Long.MAX_VALUE;
        boolean found = false;

        for(Object arg: args) {
            if(arg instanceof Integer) {
                minInt = java.lang.Math.min( minInt, (Integer) arg );
                found = true;
            }
            else if(arg instanceof Double) {
                minDouble = java.lang.Math.min( minDouble, (Double) arg );
                found = true;
            }
            else if(arg instanceof Long) {
                minLong = java.lang.Math.min( minLong, (Long) arg );
                found = true;
            }
            else if(arg instanceof String) {
                Optional<?> optional = Objects.toNumber( arg );
                if(optional.isPresent()) {
                    arg = optional.get();
                    if(arg instanceof Integer) {
                        minInt = java.lang.Math.min( minInt, (Integer) arg );
                        found = true;
                    }
                    else if(arg instanceof Double) {
                        minDouble = java.lang.Math.min( minDouble, (Double) arg );
                        found = true;
                    }
                    else if(arg instanceof Long) {
                        minLong = java.lang.Math.min(minLong, (Long) arg);
                        found = true;
                    }
                }
            }
        }
        if(!found) {
            return Optional.empty();
        }
        // explicit getter method calls to avoid runtime autoboxing
        if(minInt.longValue() <= minDouble.longValue() && minInt.longValue() <= minLong) {
            return Optional.<Number>of(minInt);
        }
        else if(minLong <= minDouble.longValue()) {
            return Optional.<Number>of(minLong);
        }
        else {
            return Optional.<Number>of(minDouble);
        }
    }
public static Optional < Number > min ( List < Object > args ) { if ( args == null || args . size ( ) == 0 ) { return Optional . empty ( ) ; } Integer minInt = Integer . MAX_VALUE ; Double minDouble = Double . MAX_VALUE ; Long minLong = Long . MAX_VALUE ; boolean found = false ; for ( Object arg : args ) { if ( arg instanceof Integer ) { minInt = java . lang . Math . min ( minInt , ( Integer ) arg ) ; found = true ; } else if ( arg instanceof Double ) { minDouble = java . lang . Math . min ( minDouble , ( Double ) arg ) ; found = true ; } else if ( arg instanceof Long ) { minLong = java . lang . Math . min ( minLong , ( Long ) arg ) ; found = true ; } else if ( arg instanceof String ) { Optional < ? > optional = Objects . toNumber ( arg ) ; if ( optional . isPresent ( ) ) { arg = optional . get ( ) ; if ( arg instanceof Integer ) { minInt = java . lang . Math . min ( minInt , ( Integer ) arg ) ; found = true ; } else if ( arg instanceof Double ) { minDouble = java . lang . Math . min ( minDouble , ( Double ) arg ) ; found = true ; } else if ( arg instanceof Long ) { minLong = java . lang . Math . min ( minLong , ( Long ) arg ) ; found = true ; } } } } if ( ! found ) { return Optional . empty ( ) ; } if ( minInt . longValue ( ) <= minDouble . longValue ( ) && minInt . longValue ( ) <= minLong ) { return Optional . < Number > of ( minInt ) ; } else if ( minLong <= minDouble . longValue ( ) ) { return Optional . < Number > of ( minLong ) ; } else { return Optional . < Number > of ( minDouble ) ; } }
Given a list of objects, returns the min value in its appropriate type
also, interprets String as Number and returns appropriately

min(1d,2l,3) == Optional.of(1d)
min("1.0",2l,d) == Optional.of(1.0)
min("a", "b", "c") == Optional.empty()
min([]) == Optional.empty()