@Test public void testEquals() { Builder erb = EvpnType3Route.builder() .setNetwork(Prefix.parse("1.1.1.0/24")) .setOriginatorIp(Ip.parse("1.1.1.1")) .setOriginType(OriginType.IGP) .setProtocol(RoutingProtocol.BGP) .setRouteDistinguisher(RouteDistinguisher.from(Ip.parse("1.1.1.1"), 2)) .setVniIp(Ip.parse("1.1.1.1")); new EqualsTester() .addEqualityGroup(erb.build(), erb.build()) .addEqualityGroup(erb.setAdmin(10).build()) .addEqualityGroup(erb.setNonRouting(true).build()) .addEqualityGroup(erb.setNonForwarding(true).build()) .addEqualityGroup(erb.setAsPath(AsPath.ofSingletonAsSets(1L, 1L)).build()) .addEqualityGroup(erb.setClusterList(ImmutableSet.of(1L)).build()) .addEqualityGroup(erb.setCommunities(ImmutableSet.of(StandardCommunity.of(1L))).build()) .addEqualityGroup(erb.setDiscard(true).build()) .addEqualityGroup(erb.setLocalPreference(10).build()) .addEqualityGroup(erb.setMetric(10).build()) .addEqualityGroup(erb.setNextHopInterface("blah").build()) .addEqualityGroup(erb.setNextHopIp(Ip.parse("2.2.2.2")).build()) .addEqualityGroup(erb.setOriginatorIp(Ip.parse("2.2.2.2")).build()) .addEqualityGroup(erb.setOriginType(OriginType.INCOMPLETE).build()) .addEqualityGroup(erb.setReceivedFromIp(Ip.parse("1.1.1.1")).build()) .addEqualityGroup(erb.setReceivedFromRouteReflectorClient(true).build()) .addEqualityGroup(erb.setProtocol(RoutingProtocol.IBGP).build()) .addEqualityGroup(erb.setSrcProtocol(RoutingProtocol.STATIC).build()) .addEqualityGroup(erb.setWeight(1).build()) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof EvpnType3Route)) { return false; } EvpnType3Route other = (EvpnType3Route) o; return (_hashCode == other._hashCode || _hashCode == 0 || other._hashCode == 0) && Objects.equals(_network, other._network) && _admin == other._admin && getNonRouting() == other.getNonRouting() && getNonForwarding() == other.getNonForwarding() && _discard == other._discard && _localPreference == other._localPreference && _med == other._med && _receivedFromRouteReflectorClient == other._receivedFromRouteReflectorClient && _weight == other._weight && Objects.equals(_asPath, other._asPath) && Objects.equals(_clusterList, other._clusterList) && Objects.equals(_communities, other._communities) && _nextHopInterface.equals(other._nextHopInterface) && Objects.equals(_nextHopIp, other._nextHopIp) && Objects.equals(_originatorIp, other._originatorIp) && _originType == other._originType && _protocol == other._protocol && Objects.equals(_receivedFromIp, other._receivedFromIp) && Objects.equals(_routeDistinguisher, other._routeDistinguisher) && _srcProtocol == other._srcProtocol && _tag == other._tag && Objects.equals(_vniIp, other._vniIp); }
EvpnType3Route extends EvpnRoute<EvpnType3Route.Builder, EvpnType3Route> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof EvpnType3Route)) { return false; } EvpnType3Route other = (EvpnType3Route) o; return (_hashCode == other._hashCode || _hashCode == 0 || other._hashCode == 0) && Objects.equals(_network, other._network) && _admin == other._admin && getNonRouting() == other.getNonRouting() && getNonForwarding() == other.getNonForwarding() && _discard == other._discard && _localPreference == other._localPreference && _med == other._med && _receivedFromRouteReflectorClient == other._receivedFromRouteReflectorClient && _weight == other._weight && Objects.equals(_asPath, other._asPath) && Objects.equals(_clusterList, other._clusterList) && Objects.equals(_communities, other._communities) && _nextHopInterface.equals(other._nextHopInterface) && Objects.equals(_nextHopIp, other._nextHopIp) && Objects.equals(_originatorIp, other._originatorIp) && _originType == other._originType && _protocol == other._protocol && Objects.equals(_receivedFromIp, other._receivedFromIp) && Objects.equals(_routeDistinguisher, other._routeDistinguisher) && _srcProtocol == other._srcProtocol && _tag == other._tag && Objects.equals(_vniIp, other._vniIp); } }
EvpnType3Route extends EvpnRoute<EvpnType3Route.Builder, EvpnType3Route> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof EvpnType3Route)) { return false; } EvpnType3Route other = (EvpnType3Route) o; return (_hashCode == other._hashCode || _hashCode == 0 || other._hashCode == 0) && Objects.equals(_network, other._network) && _admin == other._admin && getNonRouting() == other.getNonRouting() && getNonForwarding() == other.getNonForwarding() && _discard == other._discard && _localPreference == other._localPreference && _med == other._med && _receivedFromRouteReflectorClient == other._receivedFromRouteReflectorClient && _weight == other._weight && Objects.equals(_asPath, other._asPath) && Objects.equals(_clusterList, other._clusterList) && Objects.equals(_communities, other._communities) && _nextHopInterface.equals(other._nextHopInterface) && Objects.equals(_nextHopIp, other._nextHopIp) && Objects.equals(_originatorIp, other._originatorIp) && _originType == other._originType && _protocol == other._protocol && Objects.equals(_receivedFromIp, other._receivedFromIp) && Objects.equals(_routeDistinguisher, other._routeDistinguisher) && _srcProtocol == other._srcProtocol && _tag == other._tag && Objects.equals(_vniIp, other._vniIp); } private  EvpnType3Route(
      int admin,
      AsPath asPath,
      Set<Long> clusterList,
      Set<Community> communities,
      boolean discard,
      long localPreference,
      long med,
      String nextHopInterface,
      Ip nextHopIp,
      boolean nonForwarding,
      boolean nonRouting,
      Ip originatorIp,
      OriginType originType,
      RoutingProtocol protocol,
      @Nullable Ip receivedFromIp,
      boolean receivedFromRouteReflectorClient,
      RouteDistinguisher routeDistinguisher,
      @Nullable RoutingProtocol srcProtocol,
      long tag,
      Ip vniIp,
      int weight); }
EvpnType3Route extends EvpnRoute<EvpnType3Route.Builder, EvpnType3Route> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof EvpnType3Route)) { return false; } EvpnType3Route other = (EvpnType3Route) o; return (_hashCode == other._hashCode || _hashCode == 0 || other._hashCode == 0) && Objects.equals(_network, other._network) && _admin == other._admin && getNonRouting() == other.getNonRouting() && getNonForwarding() == other.getNonForwarding() && _discard == other._discard && _localPreference == other._localPreference && _med == other._med && _receivedFromRouteReflectorClient == other._receivedFromRouteReflectorClient && _weight == other._weight && Objects.equals(_asPath, other._asPath) && Objects.equals(_clusterList, other._clusterList) && Objects.equals(_communities, other._communities) && _nextHopInterface.equals(other._nextHopInterface) && Objects.equals(_nextHopIp, other._nextHopIp) && Objects.equals(_originatorIp, other._originatorIp) && _originType == other._originType && _protocol == other._protocol && Objects.equals(_receivedFromIp, other._receivedFromIp) && Objects.equals(_routeDistinguisher, other._routeDistinguisher) && _srcProtocol == other._srcProtocol && _tag == other._tag && Objects.equals(_vniIp, other._vniIp); } private  EvpnType3Route(
      int admin,
      AsPath asPath,
      Set<Long> clusterList,
      Set<Community> communities,
      boolean discard,
      long localPreference,
      long med,
      String nextHopInterface,
      Ip nextHopIp,
      boolean nonForwarding,
      boolean nonRouting,
      Ip originatorIp,
      OriginType originType,
      RoutingProtocol protocol,
      @Nullable Ip receivedFromIp,
      boolean receivedFromRouteReflectorClient,
      RouteDistinguisher routeDistinguisher,
      @Nullable RoutingProtocol srcProtocol,
      long tag,
      Ip vniIp,
      int weight); @Nonnull Ip getVniIp(); static Builder builder(); @Override Builder toBuilder(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); }
EvpnType3Route extends EvpnRoute<EvpnType3Route.Builder, EvpnType3Route> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof EvpnType3Route)) { return false; } EvpnType3Route other = (EvpnType3Route) o; return (_hashCode == other._hashCode || _hashCode == 0 || other._hashCode == 0) && Objects.equals(_network, other._network) && _admin == other._admin && getNonRouting() == other.getNonRouting() && getNonForwarding() == other.getNonForwarding() && _discard == other._discard && _localPreference == other._localPreference && _med == other._med && _receivedFromRouteReflectorClient == other._receivedFromRouteReflectorClient && _weight == other._weight && Objects.equals(_asPath, other._asPath) && Objects.equals(_clusterList, other._clusterList) && Objects.equals(_communities, other._communities) && _nextHopInterface.equals(other._nextHopInterface) && Objects.equals(_nextHopIp, other._nextHopIp) && Objects.equals(_originatorIp, other._originatorIp) && _originType == other._originType && _protocol == other._protocol && Objects.equals(_receivedFromIp, other._receivedFromIp) && Objects.equals(_routeDistinguisher, other._routeDistinguisher) && _srcProtocol == other._srcProtocol && _tag == other._tag && Objects.equals(_vniIp, other._vniIp); } private  EvpnType3Route(
      int admin,
      AsPath asPath,
      Set<Long> clusterList,
      Set<Community> communities,
      boolean discard,
      long localPreference,
      long med,
      String nextHopInterface,
      Ip nextHopIp,
      boolean nonForwarding,
      boolean nonRouting,
      Ip originatorIp,
      OriginType originType,
      RoutingProtocol protocol,
      @Nullable Ip receivedFromIp,
      boolean receivedFromRouteReflectorClient,
      RouteDistinguisher routeDistinguisher,
      @Nullable RoutingProtocol srcProtocol,
      long tag,
      Ip vniIp,
      int weight); @Nonnull Ip getVniIp(); static Builder builder(); @Override Builder toBuilder(); @Override boolean equals(@Nullable Object o); @Override int hashCode();  }