Design for collections upgrades
tronicek at fit.cvut.cz
Thu Mar 10 03:18:18 PST 2011
I have not being thinking of it. The first idea is:
Class<Set> c = (Class<Set>) set.getClass();
Set<T> newSet = c.newInstance();
FIT CTU in Prague
Rémi Forax napsal(a):
> Le 10/03/2011 11:46, "Zdeněk Troníček" a écrit :
>> To me it seems logical that filter() returns the same collection as was
>> the original collection. For Set you do not have any other choice
>> cannot switch from HashSet to TreeSet or back.
> How do you implement that ?
More information about the lambda-dev