summaryrefslogblamecommitdiff
path: root/src/library/scala/BufferedIterator.scala
blob: 67d50161936ebb9598a8699b2b1b7000e8a86490 (plain) (tree)
1
2
3
4
5
6
7
8

                                                                          
                                                                          


                                                                          

                                                                          


       
             
 
                                                                    
                                  
  

                            
   
                                                
 




                                                
 
                                                   
 
/*                     __                                               *\
**     ________ ___   / /  ___     Scala API                            **
**    / __/ __// _ | / /  / _ |    (c) 2003-2006, LAMP/EPFL             **
**  __\ \/ /__/ __ |/ /__/ __ |                                         **
** /____/\___/_/ |_/____/_/ | |                                         **
**                          |/                                          **
\*                                                                      */

// $Id$


package scala

/** Buffered iterators are iterators which allow to inspect the next
 *  element without discarding it.
 *
 *  @author  Martin Odersky
 *  @version 1.0, 16/07/2003
 */
trait BufferedIterator[+A] extends Iterator[A] {

  /** Checks what the next available element is.
   *
   *  @return the current element
   */
  def head: A

  override def buffered: BufferedIterator[A] = this
}