pkt1583 / functionaljava

Automatically exported from code.google.com/p/functionaljava
0 stars 0 forks source link

Java Statement Problem #35

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
what different between this statement: 

for (Lookup lookup : fixImcomeList) {
//            for (MonthlyFinancial memberFinancial : mmeberFinancialList) {
//                if 
(lookup.value.equals(memberFinancial.monthlyFinancialCode)) {
//                    displayIncomeList.add(lookup.value);
//                }
//            }
//            for (MonthlyFinancial spouseFinancial : spouseFinancialList) {
//                if 
(lookup.value.equals(spouseFinancial.monthlyFinancialCode)) {
//                    displayIncomeList.add(lookup.value);
//                }
//            }
//        }
//        for (Lookup lookup : fixDeductList) {
//            for (MonthlyFinancial memberFinancial : mmeberFinancialList) {
//                if 
(lookup.value.equals(memberFinancial.monthlyFinancialCode)) {
//                    displayDeductList.add(lookup.value);
//                }
//            }
//            for (MonthlyFinancial spouseFinancial : spouseFinancialList) {
//                if 
(lookup.value.equals(spouseFinancial.monthlyFinancialCode)) {
//                    displayDeductList.add(lookup.value);
//                }
//            }
//        }

and this statement:

 allFinancialList.addAll(mmeberFinancialList);
        allFinancialList.addAll(spouseFinancialList);
        displayIncomeList = new ArrayList<String>(getDisplayFinancialList(fixImcomeList, allFinancialList));
        displayDeductList = new ArrayList<String>(getDisplayFinancialList(fixDeductList, allFinancialList));
        render(mmeberFinancialList, spouseFinancialList, displayIncomeList, displayDeductList);
    }

    /**
     * .
     * @param fixList fix list
     * @param financialList data to check
     * @return display list
     */
    public static Set<String> getDisplayFinancialList(final List<Lookup> fixList,
            final List<MonthlyFinancial> financialList) {
        Set<String> displayList = new HashSet();
        for (Lookup lookup : fixList) {
            for (MonthlyFinancial monthlyFinancial : financialList) {
                if (lookup.value.equals(monthlyFinancial.monthlyFinancialCode)) {
                    displayList.add(lookup.value);
                }
            }

can some one help me....

Original issue reported on code.google.com by shariza...@gmail.com on 3 Jan 2012 at 3:38