@Test public void testEquals() { Builder builder = Ipv4UnicastAddressFamily.builder(); Ipv4UnicastAddressFamily af = builder.build(); new EqualsTester() .addEqualityGroup(af, af, builder.build()) .addEqualityGroup( builder .setAddressFamilyCapabilities( AddressFamilyCapabilities.builder().setSendCommunity(true).build()) .build()) .addEqualityGroup(builder.setExportPolicy("export").build()) .addEqualityGroup(builder.setImportPolicy("import").build()) .addEqualityGroup(builder.setExportPolicySources(ImmutableSortedSet.of("foo")).build()) .addEqualityGroup(builder.setImportPolicySources(ImmutableSortedSet.of("bar")).build()) .addEqualityGroup(builder.setRouteReflectorClient(true)) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof Ipv4UnicastAddressFamily)) { return false; } Ipv4UnicastAddressFamily that = (Ipv4UnicastAddressFamily) o; return _addressFamilyCapabilities.equals(that._addressFamilyCapabilities) && Objects.equals(_exportPolicy, that._exportPolicy) && Objects.equals(_importPolicy, that._importPolicy) && _exportPolicySources.equals(that._exportPolicySources) && _importPolicySources.equals(that._importPolicySources) && _routeReflectorClient == that._routeReflectorClient; }
Ipv4UnicastAddressFamily extends AddressFamily { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof Ipv4UnicastAddressFamily)) { return false; } Ipv4UnicastAddressFamily that = (Ipv4UnicastAddressFamily) o; return _addressFamilyCapabilities.equals(that._addressFamilyCapabilities) && Objects.equals(_exportPolicy, that._exportPolicy) && Objects.equals(_importPolicy, that._importPolicy) && _exportPolicySources.equals(that._exportPolicySources) && _importPolicySources.equals(that._importPolicySources) && _routeReflectorClient == that._routeReflectorClient; } }
Ipv4UnicastAddressFamily extends AddressFamily { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof Ipv4UnicastAddressFamily)) { return false; } Ipv4UnicastAddressFamily that = (Ipv4UnicastAddressFamily) o; return _addressFamilyCapabilities.equals(that._addressFamilyCapabilities) && Objects.equals(_exportPolicy, that._exportPolicy) && Objects.equals(_importPolicy, that._importPolicy) && _exportPolicySources.equals(that._exportPolicySources) && _importPolicySources.equals(that._importPolicySources) && _routeReflectorClient == that._routeReflectorClient; } private  Ipv4UnicastAddressFamily(
      AddressFamilyCapabilities addressFamilyCapabilities,
      @Nullable String exportPolicy,
      SortedSet<String> exportPolicySources,
      @Nullable String importPolicy,
      SortedSet<String> importPolicySources,
      boolean routeReflectorClient); }
Ipv4UnicastAddressFamily extends AddressFamily { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof Ipv4UnicastAddressFamily)) { return false; } Ipv4UnicastAddressFamily that = (Ipv4UnicastAddressFamily) o; return _addressFamilyCapabilities.equals(that._addressFamilyCapabilities) && Objects.equals(_exportPolicy, that._exportPolicy) && Objects.equals(_importPolicy, that._importPolicy) && _exportPolicySources.equals(that._exportPolicySources) && _importPolicySources.equals(that._importPolicySources) && _routeReflectorClient == that._routeReflectorClient; } private  Ipv4UnicastAddressFamily(
      AddressFamilyCapabilities addressFamilyCapabilities,
      @Nullable String exportPolicy,
      SortedSet<String> exportPolicySources,
      @Nullable String importPolicy,
      SortedSet<String> importPolicySources,
      boolean routeReflectorClient); @Override Type getType(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); static Builder builder(); }
Ipv4UnicastAddressFamily extends AddressFamily { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof Ipv4UnicastAddressFamily)) { return false; } Ipv4UnicastAddressFamily that = (Ipv4UnicastAddressFamily) o; return _addressFamilyCapabilities.equals(that._addressFamilyCapabilities) && Objects.equals(_exportPolicy, that._exportPolicy) && Objects.equals(_importPolicy, that._importPolicy) && _exportPolicySources.equals(that._exportPolicySources) && _importPolicySources.equals(that._importPolicySources) && _routeReflectorClient == that._routeReflectorClient; } private  Ipv4UnicastAddressFamily(
      AddressFamilyCapabilities addressFamilyCapabilities,
      @Nullable String exportPolicy,
      SortedSet<String> exportPolicySources,
      @Nullable String importPolicy,
      SortedSet<String> importPolicySources,
      boolean routeReflectorClient); @Override Type getType(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); static Builder builder();  }