> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> > * use size() method rather than getCount() to be more Java 2
> > collections-like
> >
>
> Sounds good. The original classes were written pre-Java2, so now would be
> a good time to update the names (and make any other changes that improve
> their integration with the Java2 collections classes as appropriate).
You could say that the verbs "add" and "remove" are used quite a lot in the
Java 2 collections.
<aside>
I saw somewhere today that the Java 2 collections are referred to as the
Java Collection Framework or JCF which is a new one on me).
</aside>
So the Queue interface might be more JCF-like if it were:-
public interface Queue {
public void add(Object);
// blocking remove
public Object remove();
public Object remove(long timeout);
// non-blocking
public Object removeNoWait();
// peek - doesn't remove
public Object get();
}
I'm less sure about the get() method. getFirst() would be like LinkedList?
Maybe leaving it as peek() is more appropriate....
James
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com