Collectors.to* signatures (original) (raw)
Michael Nascimento misterm at gmail.com
Thu Apr 18 17:54:34 PDT 2013
- Previous message: RFR: JDK-8011920 (Main implementation classes for java.util.stream)
- Next message: Collectors.to* signatures
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi guys,
Just got bitten by the fact toList() might produce an immutable list.
Since we don't have immutable collections as types in Java, I wonder if the old ugly List<? extends T> wouldn't be a better return type, effectively preventing people from doing what I did.
Regards, Michael
- Previous message: RFR: JDK-8011920 (Main implementation classes for java.util.stream)
- Next message: Collectors.to* signatures
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]