[Java] Update auto-generated Java bindings for 0.0.113
[ldk-java] / src / main / java / org / ldk / structs / DataLossProtect.java
index d316e5f38ed1c65c5abefac5535c281f645cb0f1..d094c5dc531d12a3686a36fcd4e52b5c23b26a16 100644 (file)
@@ -69,8 +69,8 @@ public class DataLossProtect extends CommonBase {
                Reference.reachabilityFence(your_last_per_commitment_secret_arg);
                Reference.reachabilityFence(my_current_per_commitment_point_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
-               DataLossProtect ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new DataLossProtect(null, ret); }
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               org.ldk.structs.DataLossProtect ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DataLossProtect(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
                return ret_hu_conv;
        }
 
@@ -87,9 +87,26 @@ public class DataLossProtect extends CommonBase {
                long ret = bindings.DataLossProtect_clone(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               DataLossProtect ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new DataLossProtect(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
+               org.ldk.structs.DataLossProtect ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DataLossProtect(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two DataLossProtects contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(org.ldk.structs.DataLossProtect b) {
+               boolean ret = bindings.DataLossProtect_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof DataLossProtect)) return false;
+               return this.eq((DataLossProtect)o);
+       }
 }