@Override
    public int compare(AAccount o1, AAccount o2) {
        String val1, val2;
        try {
            try {
                val1 = o1.getClass().getMethod(methodName, null).invoke(o1).toString();
                val2 = o1.getClass().getMethod(methodName, null).invoke(o2).toString();
                return (val1.compareTo(val2));
            } catch (IllegalAccessException ex) {
                Logger.getLogger(AccountComparator.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IllegalArgumentException ex) {
                Logger.getLogger(AccountComparator.class.getName()).log(Level.SEVERE, null, ex);
            } catch (InvocationTargetException ex) {
                Logger.getLogger(AccountComparator.class.getName()).log(Level.SEVERE, null, ex);
            }
        } catch (NoSuchMethodException ex) {
            Logger.getLogger(AccountComparator.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SecurityException ex) {
            Logger.getLogger(AccountComparator.class.getName()).log(Level.SEVERE, null, ex);
        }
        return 0;
    }