commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: [Collections] UnmodifiableSet/UnmodifiableList
Date Fri, 24 Mar 2017 15:57:13 GMT
2017-03-23 16:55 GMT+01:00 Javen O'Neal <javenoneal@gmail.com>:
> The best solution is to document where you return an UnmodifiableSet versus
> a regular Set in your Javadocs.

Disagree, compare these two examples:

/**
 * An immutable set, do not try to modify it
 */
private Set<String> excluded;

vs

private UnmodifiableSet<String> excluded;


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message