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.


Gary Gregory <[email protected]> 于 2019年10月29日周二 上午3:29写道:

> On Mon, Oct 28, 2019 at 3:16 PM Xeno Amess <[email protected]> wrote:
>
> > then it is better to make a AbstractBitSet abstract class?and two sub
> > classes MutableBitSet and ImmutableBitSet...
> >
>
> Why would you need that? The JRE already has a BitSet class. The idea is to
> reuse it, hence the new Lang immutable type extending the existing JRE
> mutable one. I do not think we need to reinvent the wheel here.
>
> Gary
>
>
> > ?? Outlook for Android<https://aka.ms/ghei36>
> >
> > ________________________________
> > From: Gary Gregory <[email protected]>
> > Sent: Tuesday, October 29, 2019 2:42:29 AM
> > To: Commons Developers List <[email protected]>
> > 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 could also be used in some of our methods that return a new empty bit
> > set, if appropriate of course.
> >
> > Gary
> >
>

Reply via email to