@Test public void testEquals() { FibForward fibForward = new FibForward(Ip.parse("1.1.1.1"), "eth0"); new EqualsTester() .addEqualityGroup(fibForward, fibForward, new FibForward(Ip.parse("1.1.1.1"), "eth0")) .addEqualityGroup(new FibForward(Ip.parse("1.1.1.2"), "eth0")) .addEqualityGroup(new FibForward(Ip.parse("1.1.1.1"), "eth1")) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof FibForward)) { return false; } FibForward rhs = (FibForward) o; return _arpIp.equals(rhs._arpIp) && _interfaceName.equals(rhs._interfaceName); }
FibForward implements FibAction { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof FibForward)) { return false; } FibForward rhs = (FibForward) o; return _arpIp.equals(rhs._arpIp) && _interfaceName.equals(rhs._interfaceName); } }
FibForward implements FibAction { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof FibForward)) { return false; } FibForward rhs = (FibForward) o; return _arpIp.equals(rhs._arpIp) && _interfaceName.equals(rhs._interfaceName); } FibForward(Ip arpIp, String interfaceName); }
FibForward implements FibAction { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof FibForward)) { return false; } FibForward rhs = (FibForward) o; return _arpIp.equals(rhs._arpIp) && _interfaceName.equals(rhs._interfaceName); } FibForward(Ip arpIp, String interfaceName); @Nonnull Ip getArpIp(); @Nonnull String getInterfaceName(); @Override boolean equals(Object o); @Override int hashCode(); @Override @Nonnull String toString(); @Override T accept(FibActionVisitor<T> visitor); }
FibForward implements FibAction { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof FibForward)) { return false; } FibForward rhs = (FibForward) o; return _arpIp.equals(rhs._arpIp) && _interfaceName.equals(rhs._interfaceName); } FibForward(Ip arpIp, String interfaceName); @Nonnull Ip getArpIp(); @Nonnull String getInterfaceName(); @Override boolean equals(Object o); @Override int hashCode(); @Override @Nonnull String toString(); @Override T accept(FibActionVisitor<T> visitor);  }