Last active
December 27, 2015 05:19
-
-
Save oscarryz/7273416 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//A) This | |
countries = ImmutableList.copyOf( Collections2.filter( | |
Sets.newLinkedHashSet(Iterables.concat(someCountries, someOthers)), | |
availableCountries)); | |
//B) vs. That | |
countries = ImmutableList.copyOf( | |
Collections2.filter( | |
Sets.newLinkedHashSet(Iterables.concat(someCountries, someOthers)), | |
availableCountries | |
) | |
); |
karlthepagan
commented
Nov 2, 2013
Definitively B.
But what about:
countries = ImmutableList.copyOf(
filter(
newLinkedHashSet(
concat(someCountries, someOthers)
),
availableCountries
)
);
I mean, static imports remove a lot of noise.
@ElderMael with static import all the things?
countries = copyOf(
filter (
newLinkedHashSet( concat( someCountries, someOthers ),
availableCountries
)
);
@karlthepagan Yeah, I notice it today :) mmmhhh too many temp vars... (2 haha)
Yeah, looking forward for Java 8, we should just use it the moment it is available... hahah
Well... perhaps not all the things. I want to know the return type without having to backtrack to the variable declaration.
@ElderMael yeah, I like that
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment