Neat way of doing stuff with a List (and such) in Java -


in c# can operations on list, this:

return mylist.average(p => p.getvalue()); 

this returns average of values. there similar in java? (that save me calculation of sum , division number of elements?)

thanks!

lambdaj provides functionality this:

double totalage = sumfrom(persons).getage(); //divide size average 

http://code.google.com/p/lambdaj/wiki/lambdajfeatures


Comments

Popular posts from this blog

delphi - TJvHidDeviceController "DevicePath" always showing "\" -

Disabling Android home button for industry application -

c# - HwndSource win32 integration with Ribbons and KeyTips -