@Test public void testEquals() { VxlanNode.Builder builder = VxlanNode.builder().setHostname("h").setVni(1); VxlanNode n = builder.build(); new EqualsTester() .addEqualityGroup(new Object()) .addEqualityGroup(n, n, builder.build()) .addEqualityGroup(builder.build().toString()) .addEqualityGroup(builder.setHostname("h2").build()) .addEqualityGroup(builder.build().toString()) .addEqualityGroup(builder.setVni(5).build()) .addEqualityGroup(builder.build().toString()) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof VxlanNode)) { return false; } VxlanNode rhs = (VxlanNode) obj; return _hostname.equals(rhs._hostname) && _vni == rhs._vni; }
VxlanNode { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof VxlanNode)) { return false; } VxlanNode rhs = (VxlanNode) obj; return _hostname.equals(rhs._hostname) && _vni == rhs._vni; } }
VxlanNode { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof VxlanNode)) { return false; } VxlanNode rhs = (VxlanNode) obj; return _hostname.equals(rhs._hostname) && _vni == rhs._vni; } VxlanNode(String hostname, int vni); }
VxlanNode { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof VxlanNode)) { return false; } VxlanNode rhs = (VxlanNode) obj; return _hostname.equals(rhs._hostname) && _vni == rhs._vni; } VxlanNode(String hostname, int vni); static @Nonnull Builder builder(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override String toString(); @JsonProperty(PROP_HOSTNAME) @Nonnull String getHostname(); @JsonProperty(PROP_VNI) int getVni(); }
VxlanNode { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof VxlanNode)) { return false; } VxlanNode rhs = (VxlanNode) obj; return _hostname.equals(rhs._hostname) && _vni == rhs._vni; } VxlanNode(String hostname, int vni); static @Nonnull Builder builder(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override String toString(); @JsonProperty(PROP_HOSTNAME) @Nonnull String getHostname(); @JsonProperty(PROP_VNI) int getVni();  }