class MathUtil extends AbstractCaller {

    @Description("Returns the maximum of the values <br/>" +
            "<b>numbers</b> - values for comparison. Must be of the same type<br/>" +
            "Example:<br/>" +
            "#{max(5, 4, 3)} returns 5")
    @UtilityMethod
    public Object max(Object ... numbers){

        try {
            Arrays.sort(numbers);
        } catch (ClassCastException e) {
            StringBuilder builder = new StringBuilder("Input params have different types:");
            for (Object o:numbers) {
                builder.append(o.getClass().getSimpleName());
                builder.append(", ");
            }
            throw new EPSCommonException(builder.toString());
        }

        return numbers[numbers.length - 1];
    }

}