@Test public void testEquals() { OspfIntraAreaRoute.Builder builder = OspfIntraAreaRoute.builder().setArea(0).setNetwork(Prefix.ZERO); OspfIntraAreaRoute r = builder.build(); new EqualsTester() .addEqualityGroup(r, r, builder.build()) .addEqualityGroup(builder.setNetwork(Prefix.parse("1.1.1.1/32")).build()) .addEqualityGroup(builder.setAdmin(1000).build()) .addEqualityGroup(builder.setArea(2L).build()) .addEqualityGroup(builder.setMetric(20L).build()) .addEqualityGroup(builder.setNextHopIp(Ip.parse("8.8.8.8")).build()) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(@Nullable Object o) { if (o == this) { return true; } else if (!(o instanceof OspfIntraAreaRoute)) { return false; } OspfIntraAreaRoute other = (OspfIntraAreaRoute) o; return _network.equals(other._network) && _admin == other._admin && _area == other._area && getNonRouting() == other.getNonRouting() && getNonForwarding() == other.getNonForwarding() && _metric == other._metric && _nextHopIp.equals(other._nextHopIp) && _tag == other._tag; }
OspfIntraAreaRoute extends OspfInternalRoute { @Override public boolean equals(@Nullable Object o) { if (o == this) { return true; } else if (!(o instanceof OspfIntraAreaRoute)) { return false; } OspfIntraAreaRoute other = (OspfIntraAreaRoute) o; return _network.equals(other._network) && _admin == other._admin && _area == other._area && getNonRouting() == other.getNonRouting() && getNonForwarding() == other.getNonForwarding() && _metric == other._metric && _nextHopIp.equals(other._nextHopIp) && _tag == other._tag; } }
OspfIntraAreaRoute extends OspfInternalRoute { @Override public boolean equals(@Nullable Object o) { if (o == this) { return true; } else if (!(o instanceof OspfIntraAreaRoute)) { return false; } OspfIntraAreaRoute other = (OspfIntraAreaRoute) o; return _network.equals(other._network) && _admin == other._admin && _area == other._area && getNonRouting() == other.getNonRouting() && getNonForwarding() == other.getNonForwarding() && _metric == other._metric && _nextHopIp.equals(other._nextHopIp) && _tag == other._tag; } OspfIntraAreaRoute(
      Prefix network,
      Ip nextHopIp,
      int admin,
      long metric,
      long area,
      long tag,
      boolean nonForwarding,
      boolean nonRouting); }
OspfIntraAreaRoute extends OspfInternalRoute { @Override public boolean equals(@Nullable Object o) { if (o == this) { return true; } else if (!(o instanceof OspfIntraAreaRoute)) { return false; } OspfIntraAreaRoute other = (OspfIntraAreaRoute) o; return _network.equals(other._network) && _admin == other._admin && _area == other._area && getNonRouting() == other.getNonRouting() && getNonForwarding() == other.getNonForwarding() && _metric == other._metric && _nextHopIp.equals(other._nextHopIp) && _tag == other._tag; } OspfIntraAreaRoute(
      Prefix network,
      Ip nextHopIp,
      int admin,
      long metric,
      long area,
      long tag,
      boolean nonForwarding,
      boolean nonRouting); @Nonnull @Override RoutingProtocol getProtocol(); static Builder builder(); @Override Builder toBuilder(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); }
OspfIntraAreaRoute extends OspfInternalRoute { @Override public boolean equals(@Nullable Object o) { if (o == this) { return true; } else if (!(o instanceof OspfIntraAreaRoute)) { return false; } OspfIntraAreaRoute other = (OspfIntraAreaRoute) o; return _network.equals(other._network) && _admin == other._admin && _area == other._area && getNonRouting() == other.getNonRouting() && getNonForwarding() == other.getNonForwarding() && _metric == other._metric && _nextHopIp.equals(other._nextHopIp) && _tag == other._tag; } OspfIntraAreaRoute(
      Prefix network,
      Ip nextHopIp,
      int admin,
      long metric,
      long area,
      long tag,
      boolean nonForwarding,
      boolean nonRouting); @Nonnull @Override RoutingProtocol getProtocol(); static Builder builder(); @Override Builder toBuilder(); @Override boolean equals(@Nullable Object o); @Override int hashCode();  }