DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35955>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35955


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |




------- Additional Comments From [EMAIL PROTECTED]  2005-08-06 00:53 -------
You're right. It should have been:

    public BigDecimal getTotal() {
        return ((SumTotalClosure)CollectionUtils.forAllDo(lineItems, new
SumTotalClosure())).total();
    }

I still like that better. Or I could do (one possible variation):

    public BigDecimal getTotal() {
        return ((SumTotalClosure)sumItemTotals()).total();
    }

    private Closure sumItemTotals() {
        return CollectionUtils.forAllDo(lineItems, new SumTotalClosure());
    }

I don't see how backward compatibility and casting concerns "rule this out".
There is no backward compatibility problem -- forAllDo was previously void and
now it returns a value. Casting is my (the client's) problem, not a concern of
the collections package.

Jim

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to