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

package org.xapian;

public class FixedWeightPostingSource extends PostingSource {
  private long swigCPtr;

  public FixedWeightPostingSource(long cPtr, boolean cMemoryOwn) {
    super(XapianJNI.FixedWeightPostingSource_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

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

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        XapianJNI.delete_FixedWeightPostingSource(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public FixedWeightPostingSource(double wt) {
    this(XapianJNI.new_FixedWeightPostingSource(wt), true);
  }

  public long getTermfreqMin() {
    return XapianJNI.FixedWeightPostingSource_getTermfreqMin(swigCPtr, this);
  }

  public long getTermfreqEst() {
    return XapianJNI.FixedWeightPostingSource_getTermfreqEst(swigCPtr, this);
  }

  public long getTermfreqMax() {
    return XapianJNI.FixedWeightPostingSource_getTermfreqMax(swigCPtr, this);
  }

  public double getWeight() {
    return XapianJNI.FixedWeightPostingSource_getWeight(swigCPtr, this);
  }

  public void next(double min_wt) {
    XapianJNI.FixedWeightPostingSource_next(swigCPtr, this, min_wt);
  }

  public void skipTo(long min_docid, double min_wt) {
    XapianJNI.FixedWeightPostingSource_skipTo(swigCPtr, this, min_docid, min_wt);
  }

  public boolean check(long min_docid, double min_wt) {
    return XapianJNI.FixedWeightPostingSource_check(swigCPtr, this, min_docid, min_wt);
  }

  public boolean atEnd() {
    return XapianJNI.FixedWeightPostingSource_atEnd(swigCPtr, this);
  }

  public long getDocId() {
    return XapianJNI.FixedWeightPostingSource_getDocId(swigCPtr, this);
  }

  public String name() {
    return XapianJNI.FixedWeightPostingSource_name(swigCPtr, this);
  }

  public void init(Database db_) {
    XapianJNI.FixedWeightPostingSource_init(swigCPtr, this, Database.getCPtr(db_), db_);
  }

  public String toString() {
    return XapianJNI.FixedWeightPostingSource_toString(swigCPtr, this);
  }

}
