Class ScannerBuffer

  • All Implemented Interfaces:
    Scanner

    public class ScannerBuffer
    extends java.lang.Object
    implements Scanner
    • Constructor Summary

      Constructors 
      Constructor Description
      ScannerBuffer​(Scanner inner)
      Wraps around a custom scanner and stores all so far produced tokens in a buffer
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<Symbol> getBuffered()
      Read-Only access to the buffered Symbols
      Symbol next_token()
      Return the next token, or null on end-of-file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScannerBuffer

        public ScannerBuffer​(Scanner inner)
        Wraps around a custom scanner and stores all so far produced tokens in a buffer
        Parameters:
        inner - the scanner to buffer
    • Method Detail

      • getBuffered

        public java.util.List<Symbol> getBuffered()
        Read-Only access to the buffered Symbols
        Returns:
        an unmodifiable Version of the buffer
      • next_token

        public Symbol next_token()
                          throws java.lang.Exception
        Description copied from interface: Scanner
        Return the next token, or null on end-of-file.
        Specified by:
        next_token in interface Scanner
        Throws:
        java.lang.Exception