-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathNativeDoubleOp.java
More file actions
25 lines (19 loc) · 575 Bytes
/
NativeDoubleOp.java
File metadata and controls
25 lines (19 loc) · 575 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
public class NativeDoubleOp implements java.util.function.DoubleUnaryOperator, AutoCloseable{
public NativeDoubleOp() {
}
private long nativeAddress=0;
private boolean nativeDeleteOnClose=false;
protected NativeDoubleOp(final long nativeAddress) {
this.nativeAddress = nativeAddress;
}
private native void nativeDelete();
@Override
public synchronized void close() {
nativeDelete();
}
protected void finalizer() {
close();
}
@Override
native public double applyAsDouble(double param0);
}