class NumberUtils {

    public static final double EPS = 1e-5;

    public static <T extends Number> T parseNumber(String str, Class<T> type) throws UnsupportedOperationException {
        try {
            /*
             * Try to access the staticFactory method for:
             * Byte, Short, Integer, Long, Double, and Float
             */
            Method m = type.getMethod("valueOf", String.class);
            Object o = m.invoke(type, str);
            return type.cast(o);
        } catch (NoSuchMethodException e1) {
            /* Try to access the constructor for BigDecimal or BigInteger*/
            try {
                Constructor<? extends Number> ctor = type
                    .getConstructor(String.class);
                return (T) ctor.newInstance(str);
            } catch (ReflectiveOperationException e2) {
                /* AtomicInteger and AtomicLong not supported */
                throw new UnsupportedOperationException(
                    "Cannot convert string to " + type.getName());
            }
        } catch (ReflectiveOperationException e2) {
            throw new UnsupportedOperationException("Cannot convert string to "
                + type.getName());
        }
    }

    public static boolean equalsEpsilon(double a, double b) {
        return equals(a, b, EPS);
    }

    public static boolean equals(double a, double b, double epsilon) {<FILL_FUNCTION_BODY>}
}

        return a == b || Math.abs(a - b) < epsilon;
    
<no_super_class>