
third_party.org.chokkan.crfsuite.Item Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jcrfsuite Show documentation
Show all versions of jcrfsuite Show documentation
Jcrfsuite is a Java interface for crfsuite, a fast implementation of Conditional Random Fields,
using SWIG and class injection technique
The newest version!
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.4
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package third_party.org.chokkan.crfsuite;
public class Item {
private long swigCPtr;
protected boolean swigCMemOwn;
public Item(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
public static long getCPtr(Item obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
crfsuiteJNI.delete_Item(swigCPtr);
}
swigCPtr = 0;
}
}
public Item() {
this(crfsuiteJNI.new_Item__SWIG_0(), true);
}
public Item(long n) {
this(crfsuiteJNI.new_Item__SWIG_1(n), true);
}
public long size() {
return crfsuiteJNI.Item_size(swigCPtr, this);
}
public long capacity() {
return crfsuiteJNI.Item_capacity(swigCPtr, this);
}
public void reserve(long n) {
crfsuiteJNI.Item_reserve(swigCPtr, this, n);
}
public boolean isEmpty() {
return crfsuiteJNI.Item_isEmpty(swigCPtr, this);
}
public void clear() {
crfsuiteJNI.Item_clear(swigCPtr, this);
}
public void add(Attribute x) {
crfsuiteJNI.Item_add(swigCPtr, this, Attribute.getCPtr(x), x);
}
public Attribute get(int i) {
return new Attribute(crfsuiteJNI.Item_get(swigCPtr, this, i), false);
}
public void set(int i, Attribute val) {
crfsuiteJNI.Item_set(swigCPtr, this, i, Attribute.getCPtr(val), val);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy