[Java] Update auto-generated Java bindings
[ldk-java] / src / main / java / org / ldk / structs / RouteHintHop.java
index 8df030725749b2790da90001c3d05165f7268bac..5d49c9c2e817ae85788b5f5bb021e515d5c3af78 100644 (file)
@@ -64,18 +64,18 @@ public class RouteHintHop extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.RoutingFees ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RoutingFees(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
        /**
         * The fees which must be paid to use this channel
         */
-       public void set_fees(RoutingFees val) {
+       public void set_fees(org.ldk.structs.RoutingFees val) {
                bindings.RouteHintHop_set_fees(this.ptr, val == null ? 0 : val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
-               this.ptrs_to.add(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -104,17 +104,18 @@ public class RouteHintHop extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
        /**
         * The minimum value, in msat, which must be relayed to the next hop.
         */
-       public void set_htlc_minimum_msat(Option_u64Z val) {
+       public void set_htlc_minimum_msat(org.ldk.structs.Option_u64Z val) {
                bindings.RouteHintHop_set_htlc_minimum_msat(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -125,23 +126,24 @@ public class RouteHintHop extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
        /**
         * The maximum value in msat available for routing with a single HTLC.
         */
-       public void set_htlc_maximum_msat(Option_u64Z val) {
+       public void set_htlc_maximum_msat(org.ldk.structs.Option_u64Z val) {
                bindings.RouteHintHop_set_htlc_maximum_msat(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
         * Constructs a new RouteHintHop given each field
         */
-       public static RouteHintHop of(byte[] src_node_id_arg, long short_channel_id_arg, RoutingFees fees_arg, short cltv_expiry_delta_arg, Option_u64Z htlc_minimum_msat_arg, Option_u64Z htlc_maximum_msat_arg) {
+       public static RouteHintHop of(byte[] src_node_id_arg, long short_channel_id_arg, org.ldk.structs.RoutingFees fees_arg, short cltv_expiry_delta_arg, org.ldk.structs.Option_u64Z htlc_minimum_msat_arg, org.ldk.structs.Option_u64Z htlc_maximum_msat_arg) {
                long ret = bindings.RouteHintHop_new(InternalUtils.check_arr_len(src_node_id_arg, 33), short_channel_id_arg, fees_arg == null ? 0 : fees_arg.ptr, cltv_expiry_delta_arg, htlc_minimum_msat_arg.ptr, htlc_maximum_msat_arg.ptr);
                Reference.reachabilityFence(src_node_id_arg);
                Reference.reachabilityFence(short_channel_id_arg);
@@ -151,8 +153,10 @@ public class RouteHintHop extends CommonBase {
                Reference.reachabilityFence(htlc_maximum_msat_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.RouteHintHop ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RouteHintHop(null, ret); }
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(fees_arg);
+               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(fees_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(htlc_minimum_msat_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(htlc_maximum_msat_arg); };
                return ret_hu_conv;
        }
 
@@ -170,7 +174,7 @@ public class RouteHintHop extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.RouteHintHop ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RouteHintHop(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
@@ -191,11 +195,11 @@ public class RouteHintHop extends CommonBase {
         * 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(RouteHintHop b) {
+       public boolean eq(org.ldk.structs.RouteHintHop b) {
                boolean ret = bindings.RouteHintHop_eq(this.ptr, b == null ? 0 : b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
-               this.ptrs_to.add(b);
+               if (this != null) { this.ptrs_to.add(b); };
                return ret;
        }