[Java] Update auto-generated Java bindings
[ldk-java] / src / main / java / org / ldk / structs / ReplyChannelRange.java
index 9b2d8df551b55b5a5f35b5d3e7f5c42ec7f510cd..bb3e9aac9f5f3fb3a8ed9826746b6414ec6cf4a5 100644 (file)
@@ -130,7 +130,7 @@ public class ReplyChannelRange extends CommonBase {
                Reference.reachabilityFence(short_channel_ids_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ReplyChannelRange ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ReplyChannelRange(null, ret); }
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
                return ret_hu_conv;
        }
 
@@ -148,10 +148,27 @@ public class ReplyChannelRange extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ReplyChannelRange ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ReplyChannelRange(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ReplyChannelRanges 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(ReplyChannelRange b) {
+               boolean ret = bindings.ReplyChannelRange_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 ReplyChannelRange)) return false;
+               return this.eq((ReplyChannelRange)o);
+       }
        /**
         * Read a ReplyChannelRange from a byte array, created by ReplyChannelRange_write
         */