Browse Source

add VirtualNetworkRoute.hashCode

Brenton Bostick 2 years ago
parent
commit
d0c0585553
1 changed files with 12 additions and 0 deletions
  1. 12 0
      java/src/com/zerotier/sdk/VirtualNetworkRoute.java

+ 12 - 0
java/src/com/zerotier/sdk/VirtualNetworkRoute.java

@@ -127,4 +127,16 @@ public final class VirtualNetworkRoute implements Comparable<VirtualNetworkRoute
 
         return true;
     }
+
+    @Override
+    public int hashCode() {
+
+        int result = 17;
+        result = 37 * result + (target == null ? 0 : target.hashCode());
+        result = 37 * result + (via == null ? 0 : via.hashCode());
+        result = 37 * result + flags;
+        result = 37 * result + metric;
+
+        return result;
+    }
 }