- public byte[] write(HTLCUpdate obj) {
- byte[] ret = bindings.HTLCUpdate_write(obj == null ? 0 : obj.ptr & ~1);
- this.ptrs_to.add(obj);
+ /**
+ * Checks if two HTLCUpdates 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.HTLCUpdate b) {
+ boolean ret = bindings.HTLCUpdate_eq(this.ptr, 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 HTLCUpdate)) return false;
+ return this.eq((HTLCUpdate)o);
+ }
+ /**
+ * Serialize the HTLCUpdate object into a byte array which can be read by HTLCUpdate_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.HTLCUpdate_write(this.ptr);
+ Reference.reachabilityFence(this);