Re: Why doesn't ArrayDeque implement the List interface?
- From: "Giovanni Azua" <bravegag@xxxxxxxxxxx>
- Date: Mon, 9 Mar 2009 10:33:42 +0100
Hi Joe,
"Joe Gottman" <jgottman@xxxxxxxxxxxxxxx> wrote in message
[snip]The List interface includes a few methods that would break the Queue or
I thought that ArrayDeque was the obvious solution, but I was surprised to
find that it doesn't implement the List interface. Why is this?
Dequeue semantics and invariants i.e. these List methods do not belong to
a Queue interface e.g.
http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html#get(int)
http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html#add(int,%20E)
http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html#remove(java.lang.Object)
HTH,
regards,
Giovanni
.
- Follow-Ups:
- Re: Why doesn't ArrayDeque implement the List interface?
- From: Mike Schilling
- Re: Why doesn't ArrayDeque implement the List interface?
- References:
- Why doesn't ArrayDeque implement the List interface?
- From: Joe Gottman
- Why doesn't ArrayDeque implement the List interface?
- Prev by Date: Blocking spam here (was Re: shoes on)
- Next by Date: Problems filling JTABLE with databasedata
- Previous by thread: Re: Why doesn't ArrayDeque implement the List interface?
- Next by thread: Re: Why doesn't ArrayDeque implement the List interface?
- Index(es):
Relevant Pages
|