ICU-13620 Adding comment.

X-SVN-Rev: 41057
This commit is contained in:
Shane Carr 2018-03-03 05:35:31 +00:00
parent d3aecc8bf4
commit 6b8d9a56ed

View File

@ -150,6 +150,7 @@ public class MeasureUnit implements Serializable {
Map<String, MeasureUnit> units = cache.get(type);
// Train users not to modify returned set from the start giving us more
// flexibility for implementation.
// Use CollectionSet instead of HashSet for better performance.
return units == null ? Collections.<MeasureUnit>emptySet()
: Collections.unmodifiableSet(new CollectionSet<MeasureUnit>(units.values()));
}