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 SortField {
  private long swigCPtr;
  protected boolean swigCMemOwn;

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

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

  protected void finalize() {
    delete();
  }

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

  public static SortField getFIELD_SCORE() {
    long cPtr = CLjavaJNI.get_SortField_FIELD_SCORE();
    return (cPtr == 0) ? null : new SortField(cPtr, false);
  }

  public static SortField getFIELD_DOC() {
    long cPtr = CLjavaJNI.get_SortField_FIELD_DOC();
    return (cPtr == 0) ? null : new SortField(cPtr, false);
  }

  public SortField(String field) {
    this(CLjavaJNI.new_SortField__SWIG_0(field), true);
  }

  public SortField(String field, boolean reverse) {
    this(CLjavaJNI.new_SortField__SWIG_1(field, reverse), true);
  }

  public SortField(String field, int type, boolean reverse) {
    this(CLjavaJNI.new_SortField__SWIG_2(field, type, reverse), true);
  }

  public String getField() {
    return CLjavaJNI.SortField_getField(swigCPtr);
  }

  public int getType() {
    return CLjavaJNI.SortField_getType(swigCPtr);
  }

  public boolean getReverse() {
    return CLjavaJNI.SortField_getReverse(swigCPtr);
  }

  public String toString() {
    return CLjavaJNI.SortField_toString(swigCPtr);
  }

  public final static int SCORE = CLjavaJNI.get_SortField_SCORE();
  public final static int DOC = CLjavaJNI.get_SortField_DOC();
  public final static int AUTO = CLjavaJNI.get_SortField_AUTO();
  public final static int STRING = CLjavaJNI.get_SortField_STRING();
  public final static int INT = CLjavaJNI.get_SortField_INT();
  public final static int FLOAT = CLjavaJNI.get_SortField_FLOAT();
  public final static int CUSTOM = CLjavaJNI.get_SortField_CUSTOM();
}
