added #addLast: and #removeFirst for protocoll compatibility
authorClaus Gittinger <cg@exept.de>
Thu, 27 Aug 1998 13:25:43 +0200
changeset 686 d2daab8e8c8a
parent 685 47c0d46ddda0
child 687 a7c792364bee
added #addLast: and #removeFirst for protocoll compatibility with other collections.
Queue.st
--- a/Queue.st	Thu Aug 27 12:54:31 1998 +0200
+++ b/Queue.st	Thu Aug 27 13:25:43 1998 +0200
@@ -244,6 +244,27 @@
     "Created: 22.6.1996 / 18:49:41 / cg"
 ! !
 
+!Queue methodsFor:'accessing - protocol compatibility'!
+
+addLast:someObject
+    "same as #nextPut: - for protocol compatibility with
+     other collections"
+
+    self nextPut:someObject.
+    ^ someObject
+
+    "Created: / 27.8.1998 / 11:15:29 / cg"
+!
+
+removeFirst
+    "same as #next - for protocol compatibility with
+     other collections"
+
+    ^ self next
+
+    "Created: / 27.8.1998 / 11:15:48 / cg"
+! !
+
 !Queue methodsFor:'enumerating'!
 
 do:aBlock
@@ -305,5 +326,5 @@
 !Queue class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/Queue.st,v 1.21 1998-05-21 10:52:23 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/Queue.st,v 1.22 1998-08-27 11:25:43 cg Exp $'
 ! !