com.thaiopensource.xml.dtd.parse.AtomStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of trang Show documentation
Show all versions of trang Show documentation
Jing/Trang - tools for validating and translating RelaxNG
The newest version!
package com.thaiopensource.xml.dtd.parse;
import java.util.Vector;
class AtomStream {
int tokenType;
String token;
Entity entity;
boolean eof;
private int i;
private final int len;
private final Vector v;
AtomStream(Vector v) {
this.v = v;
this.i = 0;
this.len = v.size();
}
boolean advance() {
if (i >= len) {
eof = true;
token = null;
entity = null;
tokenType = -1;
return false;
}
Atom a = (Atom)v.elementAt(i);
token = a.getToken();
tokenType = a.getTokenType();
entity = a.getEntity();
i++;
return true;
}
}