Re: Using max and HashMap.keySet()

41 views
Skip to first unread message

Mario Fusco

unread,
Dec 11, 2012, 2:43:28 AM12/11/12
to lam...@googlegroups.com
Hi Troy,

you're missing that lambdaj cannot work with final classes like String as also stated here: http://code.google.com/p/lambdaj/wiki/KnownLimitations

Mario

On Mon, Dec 10, 2012 at 10:02 PM, Troy Hughes <tr...@troyweb.net> wrote:
Hi, I'm attempting to simply find the string with the greatest length and my iterable object is a HashMap keySet therefor evaluates to a Map<String>. 

Integer length = max(this.results.keySet(), on(String.class).length());

How is the above line incorrect?  I get the following exception running it...  

ch.lambdaj.function.argument.ArgumentConversionException: Unable to convert the placeholder 11 in a valid argument.

I'm sure this is something simple I'm missing.

Reply all
Reply to author
Forward
0 new messages