1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
7 import java.lang.ref.Reference;
8 import javax.annotation.Nullable;
12 * An opaque identifier describing a specific [`Persist`] method call.
14 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
15 public class MonitorUpdateId extends CommonBase {
16 MonitorUpdateId(Object _dummy, long ptr) { super(ptr); }
17 @Override @SuppressWarnings("deprecation")
18 protected void finalize() throws Throwable {
20 if (ptr != 0) { bindings.MonitorUpdateId_free(ptr); }
24 long ret = bindings.MonitorUpdateId_clone_ptr(this.ptr);
25 Reference.reachabilityFence(this);
30 * Creates a copy of the MonitorUpdateId
32 public MonitorUpdateId clone() {
33 long ret = bindings.MonitorUpdateId_clone(this.ptr);
34 Reference.reachabilityFence(this);
35 if (ret >= 0 && ret <= 4096) { return null; }
36 org.ldk.structs.MonitorUpdateId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.MonitorUpdateId(null, ret); }
37 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
42 * Checks if two MonitorUpdateIds contain equal inner contents.
45 long ret = bindings.MonitorUpdateId_hash(this.ptr);
46 Reference.reachabilityFence(this);
50 @Override public int hashCode() {
51 return (int)this.hash();
54 * Checks if two MonitorUpdateIds contain equal inner contents.
55 * This ignores pointers and is_owned flags and looks at the values in fields.
56 * Two objects with NULL inner values will be considered "equal" here.
58 public boolean eq(MonitorUpdateId b) {
59 boolean ret = bindings.MonitorUpdateId_eq(this.ptr, b == null ? 0 : b.ptr);
60 Reference.reachabilityFence(this);
61 Reference.reachabilityFence(b);
62 if (this != null) { this.ptrs_to.add(b); };
66 @Override public boolean equals(Object o) {
67 if (!(o instanceof MonitorUpdateId)) return false;
68 return this.eq((MonitorUpdateId)o);