zhiqinghuang / lambdaj

Automatically exported from code.google.com/p/lambdaj
Apache License 2.0
0 stars 0 forks source link

Alias from() for with() in fluent interface #77

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I would like to propose an alias for with() in the LambdaCollections fluent 
interface: from(). It turns out in practice that in many cases that would be 
more readable, at least for my taste. Compare the current

Data data = with(allData).first(having(typeProperty, 
    equalToIgnoringCase(type)));

to 

Data data = from(allData).first(having(typeProperty, 
    equalToIgnoringCase(type)));

What do you think? If you like the idea, I could provide the patch.

Original issue reported on code.google.com by dietrich...@gmail.com on 21 Oct 2011 at 11:29

GoogleCodeExporter commented 8 years ago
There are already a few alias (e.g.: select and filter) in lambdaj that I would 
like to get rid of. I think that add more alias (i.e. having 2 names for the 
same thing) is just confusing and doesn't pay in improved readability.

Original comment by mario.fu...@gmail.com on 29 Jan 2012 at 10:51