[Java] Update auto-generated bindings to 0.0.115
[ldk-java] / src / main / java / org / ldk / structs / ExpiryTime.java
index 07601ecc74296944a0d52485b6eebe6cbdde2cc0..5c916db30952de57911e1ca5e4dd87f0bc383caa 100644 (file)
@@ -34,13 +34,13 @@ public class ExpiryTime extends CommonBase {
                long ret = bindings.ExpiryTime_clone(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               ExpiryTime ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ExpiryTime(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
+               org.ldk.structs.ExpiryTime ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ExpiryTime(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
        /**
-        * Checks if two ExpiryTimes contain equal inner contents.
+        * Generates a non-cryptographic 64-bit hash of the ExpiryTime.
         */
        public long hash() {
                long ret = bindings.ExpiryTime_hash(this.ptr);
@@ -56,11 +56,11 @@ public class ExpiryTime 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(ExpiryTime b) {
-               boolean ret = bindings.ExpiryTime_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
+       public boolean eq(org.ldk.structs.ExpiryTime b) {
+               boolean ret = bindings.ExpiryTime_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;
        }
 
@@ -75,20 +75,20 @@ public class ExpiryTime extends CommonBase {
                long ret = bindings.ExpiryTime_from_seconds(seconds);
                Reference.reachabilityFence(seconds);
                if (ret >= 0 && ret <= 4096) { return null; }
-               ExpiryTime ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ExpiryTime(null, ret); }
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               org.ldk.structs.ExpiryTime ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ExpiryTime(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
                return ret_hu_conv;
        }
 
        /**
-        * Construct an `ExpiryTime` from a `Duration`.
+        * Construct an `ExpiryTime` from a [`Duration`], dropping the sub-second part.
         */
        public static ExpiryTime from_duration(long duration) {
                long ret = bindings.ExpiryTime_from_duration(duration);
                Reference.reachabilityFence(duration);
                if (ret >= 0 && ret <= 4096) { return null; }
-               ExpiryTime ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ExpiryTime(null, ret); }
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               org.ldk.structs.ExpiryTime ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ExpiryTime(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
                return ret_hu_conv;
        }
 
@@ -102,7 +102,7 @@ public class ExpiryTime extends CommonBase {
        }
 
        /**
-        * Returns a reference to the underlying `Duration` (=expiry time)
+        * Returns a reference to the underlying [`Duration`] (=expiry time)
         */
        public long as_duration() {
                long ret = bindings.ExpiryTime_as_duration(this.ptr);