summaryrefslogtreecommitdiffstats
path: root/java/BluetoothObject.java
diff options
context:
space:
mode:
authorAndrei Vasiliu <[email protected]>2015-12-18 20:09:25 +0200
committerAndrei Vasiliu <[email protected]>2016-01-12 00:03:19 +0200
commita97afed4dfbdac2e364f6bd50ad6a86dfe5417c7 (patch)
tree74e53dbd0dd625739ddcf27305a85ac541ee3714 /java/BluetoothObject.java
parente6006161b8a4a2c1221f9fe1fa08569f087a4221 (diff)
Java: Added Java API
Signed-off-by: Andrei Vasiliu <[email protected]>
Diffstat (limited to 'java/BluetoothObject.java')
-rw-r--r--java/BluetoothObject.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/java/BluetoothObject.java b/java/BluetoothObject.java
new file mode 100644
index 00000000..2965b5a1
--- /dev/null
+++ b/java/BluetoothObject.java
@@ -0,0 +1,31 @@
+import java.util.*;
+
+public class BluetoothObject
+{
+ long nativeInstance;
+
+ public native BluetoothType getBluetoothType();
+ public native BluetoothObject clone();
+
+ private native void delete();
+ private native boolean operatorEqual(BluetoothObject obj);
+
+ protected BluetoothObject(long instance)
+ {
+ nativeInstance = instance;
+ }
+
+ protected void finalize()
+ {
+ delete();
+ }
+
+ public boolean equals(BluetoothObject obj)
+ {
+ if (obj == null)
+ {
+ return false;
+ }
+ return operatorEqual(obj);
+ }
+}