@Test public void testEquals() { new EqualsTester() .addEqualityGroup(packetRequest1, sameAsacketRequest1) .addEqualityGroup(packetRequest2) .addEqualityGroup(packetRequest3) .addEqualityGroup(packetRequest4) .testEquals(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } final DefaultPacketRequest other = (DefaultPacketRequest) obj; return Objects.equals(this.selector, other.selector) && Objects.equals(this.priority, other.priority) && Objects.equals(this.appId, other.appId) && Objects.equals(this.nodeId, other.nodeId) && Objects.equals(this.deviceId, other.deviceId); }
DefaultPacketRequest implements PacketRequest { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } final DefaultPacketRequest other = (DefaultPacketRequest) obj; return Objects.equals(this.selector, other.selector) && Objects.equals(this.priority, other.priority) && Objects.equals(this.appId, other.appId) && Objects.equals(this.nodeId, other.nodeId) && Objects.equals(this.deviceId, other.deviceId); } }
DefaultPacketRequest implements PacketRequest { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } final DefaultPacketRequest other = (DefaultPacketRequest) obj; return Objects.equals(this.selector, other.selector) && Objects.equals(this.priority, other.priority) && Objects.equals(this.appId, other.appId) && Objects.equals(this.nodeId, other.nodeId) && Objects.equals(this.deviceId, other.deviceId); } DefaultPacketRequest(TrafficSelector selector, PacketPriority priority,
                                ApplicationId appId, NodeId nodeId, Optional<DeviceId> deviceId); }
DefaultPacketRequest implements PacketRequest { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } final DefaultPacketRequest other = (DefaultPacketRequest) obj; return Objects.equals(this.selector, other.selector) && Objects.equals(this.priority, other.priority) && Objects.equals(this.appId, other.appId) && Objects.equals(this.nodeId, other.nodeId) && Objects.equals(this.deviceId, other.deviceId); } DefaultPacketRequest(TrafficSelector selector, PacketPriority priority,
                                ApplicationId appId, NodeId nodeId, Optional<DeviceId> deviceId); @Override TrafficSelector selector(); @Override PacketPriority priority(); @Override ApplicationId appId(); Optional<DeviceId> deviceId(); @Override NodeId nodeId(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
DefaultPacketRequest implements PacketRequest { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } final DefaultPacketRequest other = (DefaultPacketRequest) obj; return Objects.equals(this.selector, other.selector) && Objects.equals(this.priority, other.priority) && Objects.equals(this.appId, other.appId) && Objects.equals(this.nodeId, other.nodeId) && Objects.equals(this.deviceId, other.deviceId); } DefaultPacketRequest(TrafficSelector selector, PacketPriority priority,
                                ApplicationId appId, NodeId nodeId, Optional<DeviceId> deviceId); @Override TrafficSelector selector(); @Override PacketPriority priority(); @Override ApplicationId appId(); Optional<DeviceId> deviceId(); @Override NodeId nodeId(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }