[Java] Update auto-generated bindings to 0.0.115
[ldk-java] / src / main / java / org / ldk / structs / PrivateRoute.java
index ef7a6d94c9c2678a9ea341b0cb06ab82acb1c75a..c4168ae504c521dc1bbe426d04320e5a4c5a7df1 100644 (file)
@@ -37,12 +37,12 @@ public class PrivateRoute extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.PrivateRoute ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PrivateRoute(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;
        }
 
        /**
-        * Checks if two PrivateRoutes contain equal inner contents.
+        * Generates a non-cryptographic 64-bit hash of the PrivateRoute.
         */
        public long hash() {
                long ret = bindings.PrivateRoute_hash(this.ptr);
@@ -58,11 +58,11 @@ public class PrivateRoute 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(PrivateRoute b) {
+       public boolean eq(org.ldk.structs.PrivateRoute b) {
                boolean ret = bindings.PrivateRoute_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;
        }
 
@@ -73,12 +73,12 @@ public class PrivateRoute extends CommonBase {
        /**
         * Creates a new (partial) route from a list of hops
         */
-       public static Result_PrivateRouteCreationErrorZ of(RouteHint hops) {
+       public static Result_PrivateRouteCreationErrorZ of(org.ldk.structs.RouteHint hops) {
                long ret = bindings.PrivateRoute_new(hops == null ? 0 : hops.ptr);
                Reference.reachabilityFence(hops);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(hops);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(hops); };
                return ret_hu_conv;
        }
 
@@ -90,8 +90,8 @@ public class PrivateRoute extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.RouteHint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RouteHint(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
-               this.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               if (this != null) { this.ptrs_to.add(this); };
                return ret_hu_conv;
        }