--- a/Queue.st Fri May 12 14:35:26 1995 +0200
+++ b/Queue.st Tue May 16 19:11:07 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic2/Queue.st,v 1.8 1995-05-12 12:35:19 claus Exp $
+$Header: /cvs/stx/stx/libbasic2/Queue.st,v 1.9 1995-05-16 17:10:58 claus Exp $
'!
!Queue class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic2/Queue.st,v 1.8 1995-05-12 12:35:19 claus Exp $
+$Header: /cvs/stx/stx/libbasic2/Queue.st,v 1.9 1995-05-16 17:10:58 claus Exp $
"
!
@@ -113,6 +113,14 @@
!Queue methodsFor:'accessing'!
+peek
+ "return the next value in the queue without removing it.
+ If the queue is empty, return nil."
+
+ (tally == 0) ifTrue:[^ nil].
+ ^ contentsArray at:readPosition.
+!
+
next
"return the next value in the queue;
Return nil, if the queue is empty"