Home | Download | News | Wiki | About ANTLR | Feedback | Support | Bugs


Latest version is 2.7.7.
Download now! »

Download
» Home
» Download
» News
»Using ANTLR
» Documentation
» Wiki
» FAQ
» Articles
» Grammars
» File Sharing
» Code API
» Tech Support
» Bug Tracking
»About ANTLR
» What is ANTLR
» Why use ANTLR
» Showcase
» Testimonials
» Getting Started
» Software License
» ANTLR WebLogs
» ANTLR Workshops
»StringTemplate
»TML
»PCCTS
»Feedback
»Credits
»Contact


Support StringTemplate, ANTLR Project by making a donation! Terence often pays for things like the antlr.org server, conference travel, and this site design (that alone cost US$1000). Buy him a beer and pizza remotely ;)

Search



CharQueue


antlr
Class CharQueue

java.lang.Object
  extended byantlr.CharQueue

public class CharQueue
extends java.lang.Object

A circular buffer object used by CharBuffer


Constructor Summary
CharQueue(int minSize)
           
 
Method Summary
 void append(char tok)
          Add token to end of the queue
 char elementAt(int idx)
          Fetch a token from the queue by index
 void init(int size)
          Initialize the queue.
 void removeFirst()
          Remove char from front of queue
 void reset()
          Clear the queue.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharQueue

public CharQueue(int minSize)
Method Detail

append

public final void append(char tok)
Add token to end of the queue

Parameters:
tok - The token to add

elementAt

public final char elementAt(int idx)
Fetch a token from the queue by index

Parameters:
idx - The index of the token to fetch, where zero is the token at the front of the queue

init

public void init(int size)
Initialize the queue.

Parameters:
size - The initial size of the queue

reset

public final void reset()
Clear the queue. Leaving the previous buffer alone.


removeFirst

public final void removeFirst()
Remove char from front of queue