Re: [lang] immutable BitSet

2019-10-28 Thread Gilles Sadowski
Hello. 2019-10-29 0:16 UTC+01:00, Claude Warren : > Having "ImmutableBitSet" inherit from "BitSet" breaks the latter's > contract. >> >> > no more Yes, more, AFAICT... > so than the ImmutableSet breaks the Set contract. ... because "Set" is an interface whose contract explicitly mentions some

Re: [lang] immutable BitSet

2019-10-28 Thread Claude Warren
Having "ImmutableBitSet" inherit from "BitSet" breaks the latter's contract. > > no more so than the ImmutableSet breaks the Set contract. Yes it does but the pattern is well established. -- I like: Like Like - The likeliest place on the web LinkedIn:

Re: [lang] immutable BitSet

2019-10-28 Thread Gilles Sadowski
Hi. 2019-10-28 20:38 UTC+01:00, Xeno Amess : > Then all ImmutableBitSet instance are instance of a mutable BitSet class > when we use instance of. > I just worry that could be kind of misleading sometimes. > I agree with that remark. Having "ImmutableBitSet" inherit from "BitSet" breaks the

Re: [lang] immutable BitSet

2019-10-28 Thread Xeno Amess
k we need to reinvent the wheel here. > > Gary > > > > ?? Outlook for Android<https://aka.ms/ghei36> > > > > > > From: Gary Gregory > > Sent: Tuesday, October 29, 2019 2:42:29 AM > > To: Commons Developers List

Re: [lang] immutable BitSet

2019-10-28 Thread Gary Gregory
Developers List > Subject: [lang] immutable BitSet > > Hi All, > > Any thoughts for or against adding an ImmutableBitSet as a subclass > of BitSet? > > It would throw an exception on attempt to mutate. > > I can then be used to define an EMPTY_BITSET constant. > > I

Re: [lang] immutable BitSet

2019-10-28 Thread Xeno Amess
ubject: [lang] immutable BitSet Hi All, Any thoughts for or against adding an ImmutableBitSet as a subclass of BitSet? It would throw an exception on attempt to mutate. I can then be used to define an EMPTY_BITSET constant. I could also be used in some of our methods that return a new empty b

[lang] immutable BitSet

2019-10-28 Thread Gary Gregory
Hi All, Any thoughts for or against adding an ImmutableBitSet as a subclass of BitSet? It would throw an exception on attempt to mutate. I can then be used to define an EMPTY_BITSET constant. I could also be used in some of our methods that return a new empty bit set, if appropriate of course.