/* ----------------------------------------------------------------------------
 * 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 com.entrouvert.lasso;

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

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

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

  protected void finalize() {
    delete();
  }

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

  public StringList() {
    this(lassoJNI.new_StringList(), true);
  }

  public void append(String item) {
    lassoJNI.StringList_append(swigCPtr, item);
  }

  public SWIGTYPE_p_void cast() {
    long cPtr = lassoJNI.StringList_cast(swigCPtr);
    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
  }

  public static StringList frompointer(SWIGTYPE_p_void stringArray) {
    long cPtr = lassoJNI.StringList_frompointer(SWIGTYPE_p_void.getCPtr(stringArray));
    return (cPtr == 0) ? null : new StringList(cPtr, false);
  }

  public String getItem(int index) {
    return lassoJNI.StringList_getItem(swigCPtr, index);
  }

  public int length() {
    return lassoJNI.StringList_length(swigCPtr);
  }

  public void setItem(int index, String item) {
    lassoJNI.StringList_setItem(swigCPtr, index, item);
  }

}
