@Test public void testEquals() { ConnectedRoute.Builder cr = ConnectedRoute.builder() .setNetwork(Prefix.parse("1.1.1.0/24")) .setNextHopInterface("Ethernet0"); new EqualsTester() .addEqualityGroup( cr.build(), cr.build(), cr.setNonRouting(true).build(), cr.setNonForwarding(true).build()) .addEqualityGroup(new ConnectedRoute(Prefix.parse("1.1.2.0/24"), "Ethernet0")) .addEqualityGroup(new ConnectedRoute(Prefix.parse("1.1.2.0/24"), "Ethernet1")) .addEqualityGroup(new ConnectedRoute(Prefix.parse("1.1.2.0/24"), "Ethernet1", 123)) .addEqualityGroup(new ConnectedRoute(Prefix.parse("1.1.2.0/24"), "Ethernet1", 123, 5L)) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(Object o) { if (o == this) { return true; } else if (!(o instanceof ConnectedRoute)) { return false; } ConnectedRoute rhs = (ConnectedRoute) o; return _network.equals(rhs._network) && _admin == rhs._admin && getNonRouting() == rhs.getNonRouting() && getNonForwarding() == rhs.getNonForwarding() && _nextHopInterface.equals(rhs._nextHopInterface) && _tag == rhs._tag; }
ConnectedRoute extends AbstractRoute { @Override public boolean equals(Object o) { if (o == this) { return true; } else if (!(o instanceof ConnectedRoute)) { return false; } ConnectedRoute rhs = (ConnectedRoute) o; return _network.equals(rhs._network) && _admin == rhs._admin && getNonRouting() == rhs.getNonRouting() && getNonForwarding() == rhs.getNonForwarding() && _nextHopInterface.equals(rhs._nextHopInterface) && _tag == rhs._tag; } }
ConnectedRoute extends AbstractRoute { @Override public boolean equals(Object o) { if (o == this) { return true; } else if (!(o instanceof ConnectedRoute)) { return false; } ConnectedRoute rhs = (ConnectedRoute) o; return _network.equals(rhs._network) && _admin == rhs._admin && getNonRouting() == rhs.getNonRouting() && getNonForwarding() == rhs.getNonForwarding() && _nextHopInterface.equals(rhs._nextHopInterface) && _tag == rhs._tag; } ConnectedRoute(Prefix network, String nextHopInterface);  ConnectedRoute(Prefix network, String nextHopInterface, int adminCost);  ConnectedRoute(Prefix network, String nextHopInterface, int adminCost, long tag); }
ConnectedRoute extends AbstractRoute { @Override public boolean equals(Object o) { if (o == this) { return true; } else if (!(o instanceof ConnectedRoute)) { return false; } ConnectedRoute rhs = (ConnectedRoute) o; return _network.equals(rhs._network) && _admin == rhs._admin && getNonRouting() == rhs.getNonRouting() && getNonForwarding() == rhs.getNonForwarding() && _nextHopInterface.equals(rhs._nextHopInterface) && _tag == rhs._tag; } ConnectedRoute(Prefix network, String nextHopInterface);  ConnectedRoute(Prefix network, String nextHopInterface, int adminCost);  ConnectedRoute(Prefix network, String nextHopInterface, int adminCost, long tag); @Override String toString(); @Override Long getMetric(); @Nonnull @JsonIgnore(false) @JsonProperty(PROP_NEXT_HOP_INTERFACE) @Override String getNextHopInterface(); @Nonnull @Override Ip getNextHopIp(); @Override RoutingProtocol getProtocol(); static Builder builder(); @Override Builder toBuilder(); @Override boolean equals(Object o); @Override int hashCode(); }
ConnectedRoute extends AbstractRoute { @Override public boolean equals(Object o) { if (o == this) { return true; } else if (!(o instanceof ConnectedRoute)) { return false; } ConnectedRoute rhs = (ConnectedRoute) o; return _network.equals(rhs._network) && _admin == rhs._admin && getNonRouting() == rhs.getNonRouting() && getNonForwarding() == rhs.getNonForwarding() && _nextHopInterface.equals(rhs._nextHopInterface) && _tag == rhs._tag; } ConnectedRoute(Prefix network, String nextHopInterface);  ConnectedRoute(Prefix network, String nextHopInterface, int adminCost);  ConnectedRoute(Prefix network, String nextHopInterface, int adminCost, long tag); @Override String toString(); @Override Long getMetric(); @Nonnull @JsonIgnore(false) @JsonProperty(PROP_NEXT_HOP_INTERFACE) @Override String getNextHopInterface(); @Nonnull @Override Ip getNextHopIp(); @Override RoutingProtocol getProtocol(); static Builder builder(); @Override Builder toBuilder(); @Override boolean equals(Object o); @Override int hashCode();  }