@Test public void testEquals() { BgpAdvertisementGroup.Builder builder = BgpAdvertisementGroup.builder() .setAsPath(AsPath.ofSingletonAsSets()) .setPrefixes(ImmutableSet.of(Prefix.ZERO)) .setRxPeer(Ip.ZERO) .setTxPeer(Ip.ZERO); BgpAdvertisementGroup initial = builder.build(); new EqualsTester() .addEqualityGroup(new Object()) .addEqualityGroup(initial, initial, builder.build()) .addEqualityGroup(builder.setAsPath(AsPath.ofSingletonAsSets(5L)).build()) .addEqualityGroup(builder.setDescription("hello").build()) .addEqualityGroup( builder .setExtendedCommunities(ImmutableSet.of(ExtendedCommunity.of(0, 6555L, 1L))) .build()) .addEqualityGroup(builder.setLocalPreference(1L).build()) .addEqualityGroup(builder.setMed(1L).build()) .addEqualityGroup(builder.setOriginator(Ip.parse("1.1.1.1")).build()) .addEqualityGroup(builder.setOriginType(OriginType.EGP).build()) .addEqualityGroup(builder.setPrefixes(ImmutableSet.of(Prefix.strict("1.0.0.0/8")))) .addEqualityGroup(builder.setRxPeer(Ip.parse("1.1.1.1")).build()) .addEqualityGroup(builder.setStandardCommunities(ImmutableSet.of(4L)).build()) .addEqualityGroup(builder.setTxAs(123L).build()) .addEqualityGroup(builder.setTxPeer(Ip.parse("2.2.2.2")).build()) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof BgpAdvertisementGroup)) { return false; } BgpAdvertisementGroup rhs = (BgpAdvertisementGroup) obj; return _asPath.equals(rhs._asPath) && _description.equals(rhs._description) && _extendedCommunities.equals(rhs._extendedCommunities) && _localPreference == rhs._localPreference && _med == rhs._med && _originator.equals(rhs._originator) && _originType == rhs._originType && _prefixes.equals(rhs._prefixes) && _rxPeer.equals(rhs._rxPeer) && _standardCommunities.equals(rhs._standardCommunities) && Objects.equals(_txAs, rhs._txAs) && _txPeer.equals(rhs._txPeer); }
BgpAdvertisementGroup implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof BgpAdvertisementGroup)) { return false; } BgpAdvertisementGroup rhs = (BgpAdvertisementGroup) obj; return _asPath.equals(rhs._asPath) && _description.equals(rhs._description) && _extendedCommunities.equals(rhs._extendedCommunities) && _localPreference == rhs._localPreference && _med == rhs._med && _originator.equals(rhs._originator) && _originType == rhs._originType && _prefixes.equals(rhs._prefixes) && _rxPeer.equals(rhs._rxPeer) && _standardCommunities.equals(rhs._standardCommunities) && Objects.equals(_txAs, rhs._txAs) && _txPeer.equals(rhs._txPeer); } }
BgpAdvertisementGroup implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof BgpAdvertisementGroup)) { return false; } BgpAdvertisementGroup rhs = (BgpAdvertisementGroup) obj; return _asPath.equals(rhs._asPath) && _description.equals(rhs._description) && _extendedCommunities.equals(rhs._extendedCommunities) && _localPreference == rhs._localPreference && _med == rhs._med && _originator.equals(rhs._originator) && _originType == rhs._originType && _prefixes.equals(rhs._prefixes) && _rxPeer.equals(rhs._rxPeer) && _standardCommunities.equals(rhs._standardCommunities) && Objects.equals(_txAs, rhs._txAs) && _txPeer.equals(rhs._txPeer); } private  BgpAdvertisementGroup(
      AsPath asPath,
      String description,
      Set<ExtendedCommunity> extendedCommunities,
      long localPreference,
      long med,
      Ip originator,
      OriginType originType,
      Set<Prefix> prefixes,
      Ip rxPeer,
      Set<Long> standardCommunities,
      @Nullable Long txAs,
      Ip txPeer); }
BgpAdvertisementGroup implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof BgpAdvertisementGroup)) { return false; } BgpAdvertisementGroup rhs = (BgpAdvertisementGroup) obj; return _asPath.equals(rhs._asPath) && _description.equals(rhs._description) && _extendedCommunities.equals(rhs._extendedCommunities) && _localPreference == rhs._localPreference && _med == rhs._med && _originator.equals(rhs._originator) && _originType == rhs._originType && _prefixes.equals(rhs._prefixes) && _rxPeer.equals(rhs._rxPeer) && _standardCommunities.equals(rhs._standardCommunities) && Objects.equals(_txAs, rhs._txAs) && _txPeer.equals(rhs._txPeer); } private  BgpAdvertisementGroup(
      AsPath asPath,
      String description,
      Set<ExtendedCommunity> extendedCommunities,
      long localPreference,
      long med,
      Ip originator,
      OriginType originType,
      Set<Prefix> prefixes,
      Ip rxPeer,
      Set<Long> standardCommunities,
      @Nullable Long txAs,
      Ip txPeer); static @Nonnull Builder builder(); @JsonProperty(PROP_AS_PATH) @Nonnull AsPath getAsPath(); @JsonProperty(PROP_DESCRIPTION) @Nonnull String getDescription(); @Nonnull Set<ExtendedCommunity> getExtendedCommunities(); long getLocalPreference(); long getMed(); @Nonnull Ip getOriginator(); @Nonnull OriginType getOriginType(); @Nonnull Set<Prefix> getPrefixes(); @Nonnull Ip getRxPeer(); @Nonnull Set<Long> getStandardCommunities(); @Nullable Long getTxAs(); @Nonnull Ip getTxPeer(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override String toString(); }
BgpAdvertisementGroup implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof BgpAdvertisementGroup)) { return false; } BgpAdvertisementGroup rhs = (BgpAdvertisementGroup) obj; return _asPath.equals(rhs._asPath) && _description.equals(rhs._description) && _extendedCommunities.equals(rhs._extendedCommunities) && _localPreference == rhs._localPreference && _med == rhs._med && _originator.equals(rhs._originator) && _originType == rhs._originType && _prefixes.equals(rhs._prefixes) && _rxPeer.equals(rhs._rxPeer) && _standardCommunities.equals(rhs._standardCommunities) && Objects.equals(_txAs, rhs._txAs) && _txPeer.equals(rhs._txPeer); } private  BgpAdvertisementGroup(
      AsPath asPath,
      String description,
      Set<ExtendedCommunity> extendedCommunities,
      long localPreference,
      long med,
      Ip originator,
      OriginType originType,
      Set<Prefix> prefixes,
      Ip rxPeer,
      Set<Long> standardCommunities,
      @Nullable Long txAs,
      Ip txPeer); static @Nonnull Builder builder(); @JsonProperty(PROP_AS_PATH) @Nonnull AsPath getAsPath(); @JsonProperty(PROP_DESCRIPTION) @Nonnull String getDescription(); @Nonnull Set<ExtendedCommunity> getExtendedCommunities(); long getLocalPreference(); long getMed(); @Nonnull Ip getOriginator(); @Nonnull OriginType getOriginType(); @Nonnull Set<Prefix> getPrefixes(); @Nonnull Ip getRxPeer(); @Nonnull Set<Long> getStandardCommunities(); @Nullable Long getTxAs(); @Nonnull Ip getTxPeer(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override String toString();  }