+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelInfo ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelInfo(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two ChannelInfos 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(ChannelInfo b) {
+ boolean ret = bindings.ChannelInfo_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 ChannelInfo)) return false;
+ return this.eq((ChannelInfo)o);
+ }
+ /**
+ * Returns a [`ChannelUpdateInfo`] based on the direction implied by the channel_flag.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ @Nullable
+ public ChannelUpdateInfo get_directional_info(byte channel_flags) {
+ long ret = bindings.ChannelInfo_get_directional_info(this.ptr, channel_flags);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(channel_flags);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelUpdateInfo ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelUpdateInfo(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };