Class TokenBuffer


  • class TokenBuffer
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) Token current()
      Return the token most recently inserted into the buffer (i.e., the head of the buffer.)
      (package private) void insert​(Token token)
      Inserts a token at the head of the buffer.
      (package private) Token lookBack​(int i)
      Returns the token residing "i" elements from the head of the buffer.
      • Methods inherited from class java.lang.Object

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

      • _size

        private int _size
      • _buffer

        private Token[] _buffer
      • _currPos

        private int _currPos
    • Constructor Detail

      • TokenBuffer

        TokenBuffer()
      • TokenBuffer

        TokenBuffer​(int size)
             throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • insert

        void insert​(Token token)
        Inserts a token at the head of the buffer.
      • lookBack

        Token lookBack​(int i)
        Returns the token residing "i" elements from the head of the buffer.
      • current

        Token current()
        Return the token most recently inserted into the buffer (i.e., the head of the buffer.)