PeekableStream.st
changeset 20128 a9a3a8af994f
parent 19642 4f1dabe3a949
child 20134 cab81d17f2d9
child 21033 c31725b2b658
equal deleted inserted replaced
20127:9268d5186b15 20128:a9a3a8af994f
   593 
   593 
   594     self next.
   594     self next.
   595     ^ self peek
   595     ^ self peek
   596 !
   596 !
   597 
   597 
       
   598 nextPeekOrNil
       
   599     "advance to next element and return the peeked element"
       
   600 
       
   601     self nextOrNil.
       
   602     ^ self peekOrNil
       
   603 !
       
   604 
   598 nextUpTo:anObject
   605 nextUpTo:anObject
   599     "read a collection of all objects up-to anObject and return these
   606     "read a collection of all objects up-to anObject and return these
   600      elements, but excluding anObject. 
   607      elements, but excluding anObject. 
   601      The next read operation will return anObject.
   608      The next read operation will return anObject.
   602      If anObject is not encountered, all elements up to the end are read
   609      If anObject is not encountered, all elements up to the end are read