@Test public void testEquals() { new EqualsTester() .addEqualityGroup( new FibEntry(new FibForward(Ip.parse("1.1.1.1"), "Eth1"), RESOLUTION_STEPS), new FibEntry(new FibForward(Ip.parse("1.1.1.1"), "Eth1"), RESOLUTION_STEPS)) .addEqualityGroup( new FibEntry(new FibForward(Ip.parse("1.1.1.2"), "Eth1"), RESOLUTION_STEPS)) .addEqualityGroup( new FibEntry(new FibForward(Ip.parse("1.1.1.1"), "Eth2"), RESOLUTION_STEPS)) .addEqualityGroup( new FibEntry( new FibForward(Ip.parse("1.1.1.1"), "Eth1"), ImmutableList.of(new ConnectedRoute(Prefix.parse("2.2.2.4/31"), "Eth100")))) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof FibEntry)) { return false; } FibEntry rhs = (FibEntry) o; return (_hashCode == rhs._hashCode || _hashCode == 0 || rhs._hashCode == 0) && _action.equals(rhs._action) && _resolutionSteps.equals(rhs._resolutionSteps); }
FibEntry implements Serializable { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof FibEntry)) { return false; } FibEntry rhs = (FibEntry) o; return (_hashCode == rhs._hashCode || _hashCode == 0 || rhs._hashCode == 0) && _action.equals(rhs._action) && _resolutionSteps.equals(rhs._resolutionSteps); } }
FibEntry implements Serializable { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof FibEntry)) { return false; } FibEntry rhs = (FibEntry) o; return (_hashCode == rhs._hashCode || _hashCode == 0 || rhs._hashCode == 0) && _action.equals(rhs._action) && _resolutionSteps.equals(rhs._resolutionSteps); } FibEntry(FibAction action, List<AbstractRoute> resolutionSteps); }
FibEntry implements Serializable { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof FibEntry)) { return false; } FibEntry rhs = (FibEntry) o; return (_hashCode == rhs._hashCode || _hashCode == 0 || rhs._hashCode == 0) && _action.equals(rhs._action) && _resolutionSteps.equals(rhs._resolutionSteps); } FibEntry(FibAction action, List<AbstractRoute> resolutionSteps); @Nonnull FibAction getAction(); @Nonnull List<AbstractRoute> getResolutionSteps(); @Nonnull AbstractRoute getTopLevelRoute(); AbstractRoute getResolvedToRoute(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); }
FibEntry implements Serializable { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof FibEntry)) { return false; } FibEntry rhs = (FibEntry) o; return (_hashCode == rhs._hashCode || _hashCode == 0 || rhs._hashCode == 0) && _action.equals(rhs._action) && _resolutionSteps.equals(rhs._resolutionSteps); } FibEntry(FibAction action, List<AbstractRoute> resolutionSteps); @Nonnull FibAction getAction(); @Nonnull List<AbstractRoute> getResolutionSteps(); @Nonnull AbstractRoute getTopLevelRoute(); AbstractRoute getResolvedToRoute(); @Override boolean equals(@Nullable Object o); @Override int hashCode();  }