From dsb@cs.utexas.edu Tue Aug 5 14:35:31 1997 From: "Don Batory" Date: Tue, 5 Aug 1997 13:35:11 -0500 To: Doug Orleans Subject: Re: comments Cc: lieber@ccs.neu.edu * Yes, although we would like isEmpty() to be constant time, even if * size() isn't. Size would be constant time in our implementation. * > I don't know what the elements() method is, as it isn't part of * > java.util.Enumeration. I presume that you mean the two methods * > of the Enumeration interface, right? * * No, elements() returns an Enumeration from the collection, like * the elements() methods on java.util.Vector and java.util.Hashtable. ok. * > addElement() and push() are useful if elements are stored in containers * > that basically don't maintain key ordering of elements. Right? * Right, although it would be nice if addElement() also works for sorted * collections (in which case it just adds it in the proper place, * instead of specifically at the end). OK. we have one "insert" operation - it inserts an element into the appropriate position/place in a data structure. The push? operation that you noted has more implementation semantics - i.e., where to insert an element. We can handle this case too (as a special kind of insert). We don't have this yet, but if you really need it, we can put it in. Don