You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Stephen Colebourne <sc...@btopenworld.com> on 2003/12/10 00:58:11 UTC

[collections] Deque interface?

In moving the last of the classes around before 3.0 I rediscovered
CommonsLinkedList. I am remoulding this, however I found that it has the
following additional methods to List:
  addFirst
  addLast
  getFirst
  getLast
  removeFirst
  removeLast

Some other libraries have a Deque interface that is a subinterface of List.
Other names are SList and DList. So, should we add a Deque interface to
[collections]?? (We can't add it after 3.0 as a Deque interface implies a
deque subpackage......or does it?)

Stephen


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [collections] Deque interface?

Posted by Stephen Colebourne <sc...@btopenworld.com>.
You're argument makes some sense, however its not really what I need. I need
an interface that does extend List, but has additional top and tail methods.
Like LinkedList.

At the moment, we'll probably have to do without the interface.

Stephen

----- Original Message -----
From: "Todd V. Jonker" <to...@consciouscode.com>
> I like the idea of a Deque interface, but I don't like the idea of it
> extending List.  You can't insert or peek into the middle of a queue.
> Keeping the interface more "true" to the data structure would make it
> more reusable and easier to provide other implementations.
>
> On Tue, 9 Dec 2003 23:58:11 -0000, "Stephen Colebourne"
> <sc...@btopenworld.com> said:
> raries have a Deque interface that is a subinterface of
> > List.
> > Other names are SList and DList. So, should we add a Deque interface to
> > [collections]?? (We can't add it after 3.0 as a Deque interface implies
a
> > deque subpackage......or does it?)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [collections] Deque interface?

Posted by "Todd V. Jonker" <to...@consciouscode.com>.
I like the idea of a Deque interface, but I don't like the idea of it
extending List.  You can't insert or peek into the middle of a queue. 
Keeping the interface more "true" to the data structure would make it
more reusable and easier to provide other implementations.

On Tue, 9 Dec 2003 23:58:11 -0000, "Stephen Colebourne"
<sc...@btopenworld.com> said:
raries have a Deque interface that is a subinterface of
> List.
> Other names are SList and DList. So, should we add a Deque interface to
> [collections]?? (We can't add it after 3.0 as a Deque interface implies a
> deque subpackage......or does it?)

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org