[Q] Why removeLast and removeFirst is implemented into OrderedCollection ?

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

[Q] Why removeLast and removeFirst is implemented into OrderedCollection ?

Edgar J. De Cleene-2
Why removeLast and removeFirst is implemented into OrderedCollection ?
It's not wiser have it into Collection so this way is more useful ?

Edgar



       

       
               
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas 


Reply | Threaded
Open this post in threaded view
|

Re: [Q] Why removeLast and removeFirst is implemented into OrderedCollection ?

Stuart Herring-2
On 1/17/07, Edgar J. De Cleene <[hidden email]> wrote:
> Why removeLast and removeFirst is implemented into OrderedCollection ?
> It's not wiser have it into Collection so this way is more useful ?
>
> Edgar
>
Probably because they don't make any sense unless you're dealing with
an OrderedCollection
How do you know what "first" and "last" are unless there is some sort of order?

Regards,
Stuart.

Reply | Threaded
Open this post in threaded view
|

Re: [Q] Why removeLast and removeFirst is implemented into OrderedCollection ?

tblanchard
In reply to this post by Edgar J. De Cleene-2
Collection lacks ordering as concept.
SequenceableCollections are immutable.
OrderedCollection is first one that is mutable and allows adding/
removing elements.

-Todd Blanchard

On Jan 17, 2007, at 2:16 AM, Edgar J. De Cleene wrote:

> Why removeLast and removeFirst is implemented into OrderedCollection ?
> It's not wiser have it into Collection so this way is more useful ?
>
> Edgar
>
>
>
>
>
>
>
> __________________________________________________
> Preguntá. Respondé. Descubrí.
> Todo lo que querías saber, y lo que ni imaginabas,
> está en Yahoo! Respuestas (Beta).
> ¡Probalo ya!
> http://www.yahoo.com.ar/respuestas
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [Q] Why removeLast and removeFirst is implemented into OrderedCollection ?

tblanchard
> OrderedCollection is first one that is mutable and allows adding/
> removing elements.

Ok, that's redundant - I mean is ordered and mutable.

On Jan 17, 2007, at 3:50 AM, Todd Blanchard wrote:

> Collection lacks ordering as concept.
> SequenceableCollections are immutable.
> OrderedCollection is first one that is mutable and allows adding/
> removing elements.
>
> -Todd Blanchard
>
> On Jan 17, 2007, at 2:16 AM, Edgar J. De Cleene wrote:
>
>> Why removeLast and removeFirst is implemented into  
>> OrderedCollection ?
>> It's not wiser have it into Collection so this way is more useful ?
>>
>> Edgar
>>
>>
>>
>>
>>
>>
>>
>> __________________________________________________
>> Preguntá. Respondé. Descubrí.
>> Todo lo que querías saber, y lo que ni imaginabas,
>> está en Yahoo! Respuestas (Beta).
>> ¡Probalo ya!
>> http://www.yahoo.com.ar/respuestas
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [Q] Why removeLast and removeFirst is implemented into OrderedCollection ?

Edgar J. De Cleene-2
In reply to this post by tblanchard
El 1/17/07 8:50 AM, "Todd Blanchard" <[hidden email]> escribió:

> Collection lacks ordering as concept.
> SequenceableCollections are immutable.
> OrderedCollection is first one that is mutable and allows adding/
> removing elements.
>
> -Todd Blanchard

Ok. I get.
My mistake was what in real life any objects what you collect always have a
"first" and "last".

If I describe what objects are now on top my desk, always see some first, my
glasses , pen , etc,  but of course is subjective and could't be translated
to a computer.

Very thanks.

Edgar



       

       
               
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas