+ /**
+ * Constructs a new Init given each field
+ */
+ public static Init of(InitFeatures features_arg, Option_NetAddressZ remote_network_address_arg) {
+ long ret = bindings.Init_new(features_arg == null ? 0 : features_arg.ptr, remote_network_address_arg.ptr);
+ Reference.reachabilityFence(features_arg);
+ Reference.reachabilityFence(remote_network_address_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Init ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Init(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(features_arg); };
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.Init_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the Init
+ */
+ public Init clone() {
+ long ret = bindings.Init_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Init ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Init(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two Inits 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(Init b) {
+ boolean ret = bindings.Init_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 Init)) return false;
+ return this.eq((Init)o);
+ }
+ /**
+ * Serialize the Init object into a byte array which can be read by Init_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.Init_write(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;