SequenceableCollection and remove:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SequenceableCollection and remove:

Thomas Worthington-2
Why does SequencableCollection>>#remove:ifAbsent: say

self shouldNotImplement ?

All the subclasses I've looked at do implement some sort of removal  
methods.

Thomas

Reply | Threaded
Open this post in threaded view
|

Re: SequenceableCollection and remove:

Sven Van Caekenberghe
Thomas,

On 01 Jul 2013, at 22:47, "Thomas Worthington" <[hidden email]> wrote:

> Why does SequencableCollection>>#remove:ifAbsent: say
>
> self shouldNotImplement ?
>
> All the subclasses I've looked at do implement some sort of removal methods.
>
> Thomas

This is by design, you cannot remove elements from SequencableCollections, once created they remain the same size.

If you want that, you need OrderedCollection for example.

HTH,

Sven



--
Powering the T3 Platform - http://t3-platform.net
Sven Van Caekenberghe - mailto:[hidden email]
Beta Nine - software engineering - http://www.beta9.be