scan.java
来自「JAVA在编译原理上的应用。」· Java 代码 · 共 44 行
JAVA
44 行
package lolo.scans;/** A package base class for all <tt>lolo.Scan</tt> subclasses. * * @see lolo.Scan * @author <a href="http://www.inf.uos.de/bernd" target="_blank">Bernd Kühl</a> (<a href="mailto:bernd@informatik.uni-osnabrueck.de">bernd@informatik.uni-osnabrueck.de</a>) */abstract class Scan extends lolo.Scan { /** A <tt>State</tt> object which can be used in subclasses as result for <tt>nextChar()</tt>. * * @see lolo.Scan.State * @see lolo.Scan#nextChar(char) */ protected final State stateObject = new State(); /** May be used in subclasses to mark already reseted objects. */ protected transient boolean reset; /** Indicates whether some other object is "equal to" this one. * * @return <tt>true</tt> if <tt>this</tt> and <tt>obj</tt> are from the same class, * <tt>false</tt> otherwise.*/ public boolean equals(Object obj) { if (obj == null || obj.getClass() != this.getClass()) return false; return true; } /** Returns the hash code of the <tt>Class</tt> object as hash code value for the object. * * @return <tt>this.getClass().hashCode()</tt> */ public int hashCode() { return this.getClass().hashCode(); } /** Returns a string representation of the object. * * @return a string representation of the object. */ public String toString() { return getClass().getName(); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?