@Test public void testEquals() { new EqualsTester() .addEqualityGroup(packet1, sameAsPacket1) .addEqualityGroup(packet2) .testEquals(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof OutboundPacket) { final DefaultOutboundPacket other = (DefaultOutboundPacket) obj; return Objects.equals(this.sendThrough, other.sendThrough) && Objects.equals(this.treatment, other.treatment) && Objects.equals(this.data, other.data); } return false; }
DefaultOutboundPacket implements OutboundPacket { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof OutboundPacket) { final DefaultOutboundPacket other = (DefaultOutboundPacket) obj; return Objects.equals(this.sendThrough, other.sendThrough) && Objects.equals(this.treatment, other.treatment) && Objects.equals(this.data, other.data); } return false; } }
DefaultOutboundPacket implements OutboundPacket { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof OutboundPacket) { final DefaultOutboundPacket other = (DefaultOutboundPacket) obj; return Objects.equals(this.sendThrough, other.sendThrough) && Objects.equals(this.treatment, other.treatment) && Objects.equals(this.data, other.data); } return false; } DefaultOutboundPacket(DeviceId sendThrough,
            TrafficTreatment treatment, ByteBuffer data); }
DefaultOutboundPacket implements OutboundPacket { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof OutboundPacket) { final DefaultOutboundPacket other = (DefaultOutboundPacket) obj; return Objects.equals(this.sendThrough, other.sendThrough) && Objects.equals(this.treatment, other.treatment) && Objects.equals(this.data, other.data); } return false; } DefaultOutboundPacket(DeviceId sendThrough,
            TrafficTreatment treatment, ByteBuffer data); @Override DeviceId sendThrough(); @Override TrafficTreatment treatment(); @Override ByteBuffer data(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
DefaultOutboundPacket implements OutboundPacket { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof OutboundPacket) { final DefaultOutboundPacket other = (DefaultOutboundPacket) obj; return Objects.equals(this.sendThrough, other.sendThrough) && Objects.equals(this.treatment, other.treatment) && Objects.equals(this.data, other.data); } return false; } DefaultOutboundPacket(DeviceId sendThrough,
            TrafficTreatment treatment, ByteBuffer data); @Override DeviceId sendThrough(); @Override TrafficTreatment treatment(); @Override ByteBuffer data(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }