/**
- * 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 {
}
/**
- * The short_channel_ids in the channel range
+ * The `short_channel_id`s in the channel range
*
* Returns a copy of the field.
*/
}
/**
- * 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);
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
*/