[Java] Update auto-generated bindings to LDK-C-Bindings 0.0.123.1
[ldk-java] / src / main / java / org / ldk / structs / UntrustedString.java
index 4452d700ecd390b3efcad0c5bf523842b57307ae..318a245a5b615628f47eaa03015024776e8ad63d 100644 (file)
@@ -68,7 +68,7 @@ public class UntrustedString extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.UntrustedString b) {
-               boolean ret = bindings.UntrustedString_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.UntrustedString_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -79,6 +79,18 @@ public class UntrustedString extends CommonBase {
                if (!(o instanceof UntrustedString)) return false;
                return this.eq((UntrustedString)o);
        }
+       /**
+        * Generates a non-cryptographic 64-bit hash of the UntrustedString.
+        */
+       public long hash() {
+               long ret = bindings.UntrustedString_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
        /**
         * Serialize the UntrustedString object into a byte array which can be read by UntrustedString_read
         */
@@ -99,4 +111,13 @@ public class UntrustedString extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Get the string representation of a UntrustedString object
+        */
+       public String to_str() {
+               String ret = bindings.UntrustedString_to_str(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
 }