[Java] Update auto-generated Java bindings for 0.0.113
[ldk-java] / src / main / java / org / ldk / structs / NetAddress.java
index 74ccb308db826e7627c35fb2dba03d0a742e2dfd..47f94b85b058db65821a5b922f242ae1557e5ca8 100644 (file)
@@ -213,7 +213,7 @@ public class NetAddress extends CommonBase {
        /**
         * Utility method to constructs a new Hostname-variant NetAddress
         */
-       public static NetAddress hostname(Hostname hostname, short port) {
+       public static NetAddress hostname(org.ldk.structs.Hostname hostname, short port) {
                long ret = bindings.NetAddress_hostname(hostname == null ? 0 : hostname.ptr, port);
                Reference.reachabilityFence(hostname);
                Reference.reachabilityFence(port);
@@ -224,6 +224,21 @@ public class NetAddress extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two NetAddresss contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(org.ldk.structs.NetAddress b) {
+               boolean ret = bindings.NetAddress_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof NetAddress)) return false;
+               return this.eq((NetAddress)o);
+       }
        /**
         * Serialize the NetAddress object into a byte array which can be read by NetAddress_read
         */