panda.el.parse.CharQueue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of panda-core Show documentation
Show all versions of panda-core Show documentation
Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.
package panda.el.parse;
/**
* 字符队列, 主要是为了解决reader 中使用的 cursor 临时变量的问题.
*/
public interface CharQueue {
/**
* 不删除字符的情况下读取第一个字符
* @return the peeked character
*/
char peek();
/**
* 不删除字符的情况下读取第ofset个字符,
*
* @param ofset 偏移量
* @return the peeked character
*/
char peek(int ofset);
/**
* 读取字符,并删除字符
* @return the polled character
*/
char poll();
/**
* 是否为空
* @return true if the queue is empty
*/
boolean isEmpty();
}