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

com.thaiopensource.xml.tok.Token Maven / Gradle / Ivy

There is a newer version: 20220510
Show newest version
package com.thaiopensource.xml.tok;

/**
 * Represents information returned by the tokenizing methods in
 * Tokenizer.
 *
 * @see Tokenizer#tokenizeContent
 * @see Tokenizer#tokenizeProlog
 * @see Tokenizer#tokenizeAttributeValue
 * @see Tokenizer#tokenizeEntityValue
 */
public class Token {
  int tokenEnd = -1;
  int nameEnd = -1;
  char refChar1 = 0;
  char refChar2 = 0;

  public final int getTokenEnd() {
    return tokenEnd;
  }

  protected final void setTokenEnd(int i) {
    tokenEnd = i;
  }

  public final int getNameEnd() {
    return nameEnd;
  }

  protected final void setNameEnd(int i) {
    nameEnd = i;
  }

  public final char getRefChar() {
    return refChar1;
  }

  public final void getRefCharPair(char[] ch, int off) {
    ch[off] = refChar1;
    ch[off + 1] = refChar2;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy