hg: lambda/collections/jdk: 2 new changesets

Joshua Bloch jjb at google.com
Wed Feb 23 14:44:39 PST 2011


Brian,

A minor nit:

+ private static<C extends Collection<T>, T> C filterTo(C from, C to,
Predicate<? super T> predicate) {

The T should be E, as it represents a collection *element *type. Similarly,

+ for (T t : from) {

should be:

+ for (E e : from) {

And while I'm being pedantic, I' not crazy about "from" as a variable name,
it being a preposition and all. How about "source"?

I realize that this is all just placeholder code, but I'm sending this
anyway, in hopes that these stylistic nits get fixed when (and if) the code
matures.

Josh


More information about the lambda-dev mailing list