Problem of defender methods with generic methods

Alex Buckley alex.buckley at oracle.com
Mon Nov 15 21:29:24 PST 2010


On 11/15/2010 8:58 PM, Ali Ebrahimi wrote:
> I prefer later, since Comparable  implicitly is subtype of Object.

Yes, but this is a special case. In general, the bound of T (from 
enclosing type List<T>) is not Object, and the auxiliary interfaces do 
not exist on that bound. (Imagine <A extends Person & Fooable & Quuxable>)

Alex


More information about the lambda-dev mailing list