* 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); };
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
*/
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;
+ }
+
}