+ /**
+ * Utility method to constructs a new FundingBatchClosure-variant ClosureReason
+ */
+ public static ClosureReason funding_batch_closure() {
+ long ret = bindings.ClosureReason_funding_batch_closure();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two ClosureReasons contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public boolean eq(org.ldk.structs.ClosureReason b) {
+ boolean ret = bindings.ClosureReason_eq(this.ptr, b == null ? 0 : b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof ClosureReason)) return false;
+ return this.eq((ClosureReason)o);
+ }