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

package org.chasen.mecab;

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

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

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

  public void delete() {
    if(swigCPtr != 0 && swigCMemOwn) {
      swigCMemOwn = false;
      throw new UnsupportedOperationException("C++ destructor does not have public access");
    }
    swigCPtr = 0;
  }

  public Node getRnode() {
    long cPtr = MeCabJNI.Path_rnode_get(swigCPtr);
    return (cPtr == 0) ? null : new Node(cPtr, false);
  }

  public Path getRnext() {
    long cPtr = MeCabJNI.Path_rnext_get(swigCPtr);
    return (cPtr == 0) ? null : new Path(cPtr, false);
  }

  public Node getLnode() {
    long cPtr = MeCabJNI.Path_lnode_get(swigCPtr);
    return (cPtr == 0) ? null : new Node(cPtr, false);
  }

  public Path getLnext() {
    long cPtr = MeCabJNI.Path_lnext_get(swigCPtr);
    return (cPtr == 0) ? null : new Path(cPtr, false);
  }

  public int getCost() {
    return MeCabJNI.Path_cost_get(swigCPtr);
  }

  public void setProb(float value) {
    MeCabJNI.Path_prob_set(swigCPtr, value);
  }

  public float getProb() {
    return MeCabJNI.Path_prob_get(swigCPtr);
  }

}
