[Java] Update auto-generated Java bindings
[ldk-java] / src / main / java / org / ldk / structs / WatchedOutput.java
index f94a9b071e98f3c7dbd395f842d7a6691d7b794f..ba3a0745184bd26fef6719a9ab68c1a8a3b561b0 100644 (file)
@@ -13,7 +13,7 @@ import javax.annotation.Nullable;
  * 
  * Used to convey to a [`Filter`] such an output with a given spending condition. Any transaction
  * spending the output must be given to [`ChannelMonitor::block_connected`] either directly or via
- * the return value of [`Filter::register_output`].
+ * [`Confirm::transactions_confirmed`].
  * 
  * If `block_hash` is `Some`, this indicates the output was created in the corresponding block and
  * may have been spent there. See [`Filter::register_output`] for details.
@@ -126,6 +126,23 @@ public class WatchedOutput extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two WatchedOutputs 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(WatchedOutput b) {
+               boolean ret = bindings.WatchedOutput_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 WatchedOutput)) return false;
+               return this.eq((WatchedOutput)o);
+       }
        /**
         * Checks if two WatchedOutputs contain equal inner contents.
         */