package clucene;
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.25
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


public class Token {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  protected Token(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(Token obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public void delete() {
    if(swigCPtr != 0 && swigCMemOwn) {
      swigCMemOwn = false;
      CLjavaJNI.delete_Token(swigCPtr);
    }
    swigCPtr = 0;
  }

  public Token(String text, int start, int end, String typ) {
    this(CLjavaJNI.new_Token__SWIG_0(text, start, end, typ), true);
  }

  public Token(String text, int start, int end) {
    this(CLjavaJNI.new_Token__SWIG_1(text, start, end), true);
  }

  public void setPositionIncrement(int posIncr) {
    CLjavaJNI.Token_setPositionIncrement(swigCPtr, posIncr);
  }

  public int getPositionIncrement() {
    return CLjavaJNI.Token_getPositionIncrement(swigCPtr);
  }

  public String termText() {
    return CLjavaJNI.Token_termText(swigCPtr);
  }

  public int startOffset() {
    return CLjavaJNI.Token_startOffset(swigCPtr);
  }

  public int endOffset() {
    return CLjavaJNI.Token_endOffset(swigCPtr);
  }

  public String type() {
    return CLjavaJNI.Token_type(swigCPtr);
  }

}
