All Downloads are FREE. Search and download functionalities are using the official Maven repository.

panda.el.parse.CharQueue Maven / Gradle / Ivy

Go to download

Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.

There is a newer version: 1.8.0
Show newest version
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();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy