.examples improved Android builder example

git-svn-id: svn://ultimatepp.org/upp/trunk@8659 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
klugier 2015-07-09 20:12:31 +00:00
parent 1a7978c094
commit 2dc6459f34
7 changed files with 150 additions and 80 deletions

View file

@ -1,7 +1,7 @@
package org.upp.AndroidMath;
/**
* Class witch whole implementaiton is native.
* Class which whole implementaiton is native.
*/
public class Vector
{
@ -10,21 +10,30 @@ public class Vector
construct(size);
}
public Vector(Vector vec)
{
copyConstruct(vec);
}
@Override
public void finalize()
protected void finalize() throws Throwable
{
destroy();
super.finalize();
}
// Native stuff - C/C++
public native int getSize();
public native float get(int id);
public native void set(int id, float data);
public native void set(int id, float value);
public native void multipleByScalar(float scalar);
public native String toString();
private native void construct(int size);
private native void copyConstruct(Vector vec);
private native void destroy();
static {