Loose-ends wrapup

Doug Lea dl at cs.oswego.edu
Fri May 10 11:16:56 PDT 2013

On 05/10/13 14:12, Brian Goetz wrote:
>>> Many slippery-slope questions come to mind -- doesn't this beg for:
>>>   - Bag interface
>> YAGNI. "Bag" just means "not a Set or List or other Collection
>> subinterface"
> Maybe.  A multiset typically implements a method like:
>    int count(Object)
>> unmodifiableCollection would work fine.
> except then, even if CHB implemented a count(o) method, it becomes hidden by the
> wrapper.
> So, are you saying that count(Object) is a YAGNI issue too?

Yes. Please no count method. For the same reason we don't have a count method
in List either, even though it would be equally applicable.


More information about the lambda-libs-spec-observers mailing list