@Test public void testEquals() { Bridge.Builder builder = Bridge.builder(); Bridge bridge = builder.setPorts(ImmutableSet.of()).setPvid(1).setVids(IntegerSpace.EMPTY).build(); new EqualsTester() .addEqualityGroup(new Object()) .addEqualityGroup(bridge, bridge, builder.build()) .addEqualityGroup(builder.build().toString()) .addEqualityGroup(builder.setPorts(ImmutableSet.of("a")).build()) .addEqualityGroup(builder.build().toString()) .addEqualityGroup(builder.setPvid(5).build()) .addEqualityGroup(builder.build().toString()) .addEqualityGroup(builder.setVids(IntegerSpace.of(5)).build()) .addEqualityGroup(builder.build().toString()) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Bridge)) { return false; } Bridge rhs = (Bridge) obj; return _ports.equals(rhs._ports) && _pvid == rhs._pvid && _vids.equals(rhs._vids); }
Bridge implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Bridge)) { return false; } Bridge rhs = (Bridge) obj; return _ports.equals(rhs._ports) && _pvid == rhs._pvid && _vids.equals(rhs._vids); } }
Bridge implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Bridge)) { return false; } Bridge rhs = (Bridge) obj; return _ports.equals(rhs._ports) && _pvid == rhs._pvid && _vids.equals(rhs._vids); } private  Bridge(SortedSet<String> ports, int pvid, IntegerSpace vids); }
Bridge implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Bridge)) { return false; } Bridge rhs = (Bridge) obj; return _ports.equals(rhs._ports) && _pvid == rhs._pvid && _vids.equals(rhs._vids); } private  Bridge(SortedSet<String> ports, int pvid, IntegerSpace vids); static @Nonnull Builder builder(); @JsonProperty(PROP_PORTS) @Nonnull Set<String> getPorts(); @JsonProperty(PROP_PVID) int getPvid(); @JsonProperty(PROP_VIDS) @Nonnull IntegerSpace getVids(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override @Nonnull String toString(); }
Bridge implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Bridge)) { return false; } Bridge rhs = (Bridge) obj; return _ports.equals(rhs._ports) && _pvid == rhs._pvid && _vids.equals(rhs._vids); } private  Bridge(SortedSet<String> ports, int pvid, IntegerSpace vids); static @Nonnull Builder builder(); @JsonProperty(PROP_PORTS) @Nonnull Set<String> getPorts(); @JsonProperty(PROP_PVID) int getPvid(); @JsonProperty(PROP_VIDS) @Nonnull IntegerSpace getVids(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override @Nonnull String toString();  }