[Java] Update auto-generated Java bindings to LDK 0.0.121
[ldk-java] / src / main / java / org / ldk / structs / ReplyChannelRange.java
index 6a80ecf15dd4d46f0d8046f2051a8e1c6267e65a..10ca61a3c511c876873c1c270abd9791d23b9288 100644 (file)
@@ -9,13 +9,17 @@ import javax.annotation.Nullable;
 
 
 /**
- * A reply_channel_range message is a reply to a query_channel_range
- * message. Multiple reply_channel_range messages can be sent in reply
- * to a single query_channel_range message. The query recipient makes a
+ * A [`reply_channel_range`] message is a reply to a [`QueryChannelRange`]
+ * message.
+ * 
+ * Multiple `reply_channel_range` messages can be sent in reply
+ * to a single [`QueryChannelRange`] message. The query recipient makes a
  * best effort to respond based on their local network view which may
- * not be a perfect view of the network. The short_channel_ids in the
- * reply are encoded. We only support encoding_type=0 uncompressed
- * serialization and do not support encoding_type=1 zlib serialization.
+ * not be a perfect view of the network. The `short_channel_id`s in the
+ * reply are encoded. We only support `encoding_type=0` uncompressed
+ * serialization and do not support `encoding_type=1` zlib serialization.
+ * 
+ * [`reply_channel_range`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-query_channel_range-and-reply_channel_range-messages
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class ReplyChannelRange extends CommonBase {
@@ -99,7 +103,7 @@ public class ReplyChannelRange extends CommonBase {
        }
 
        /**
-        * The short_channel_ids in the channel range
+        * The `short_channel_id`s in the channel range
         * 
         * Returns a copy of the field.
         */
@@ -110,7 +114,7 @@ public class ReplyChannelRange extends CommonBase {
        }
 
        /**
-        * The short_channel_ids in the channel range
+        * The `short_channel_id`s in the channel range
         */
        public void set_short_channel_ids(long[] val) {
                bindings.ReplyChannelRange_set_short_channel_ids(this.ptr, val);
@@ -152,6 +156,35 @@ public class ReplyChannelRange extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Generates a non-cryptographic 64-bit hash of the ReplyChannelRange.
+        */
+       public long hash() {
+               long ret = bindings.ReplyChannelRange_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
+       /**
+        * 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(org.ldk.structs.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
         */