@Test public void testContainsNodeNoSwitchPortMatch() { assertFalse(flow.getForwardPath().getSegments().get(0).containsNode(SWITCH_ID_C, 2)); }
public boolean containsNode(SwitchId switchId, int port) { if (switchId == null) { throw new IllegalArgumentException("Switch id must be not null"); } return (switchId.equals(getSrcSwitchId()) && port == getSrcPort()) || (switchId.equals(getDestSwitchId()) && port == getDestPort()); }
PathSegment implements CompositeDataEntity<PathSegment.PathSegmentData> { public boolean containsNode(SwitchId switchId, int port) { if (switchId == null) { throw new IllegalArgumentException("Switch id must be not null"); } return (switchId.equals(getSrcSwitchId()) && port == getSrcPort()) || (switchId.equals(getDestSwitchId()) && port == getDestPort()); } }
PathSegment implements CompositeDataEntity<PathSegment.PathSegmentData> { public boolean containsNode(SwitchId switchId, int port) { if (switchId == null) { throw new IllegalArgumentException("Switch id must be not null"); } return (switchId.equals(getSrcSwitchId()) && port == getSrcPort()) || (switchId.equals(getDestSwitchId()) && port == getDestPort()); } private  PathSegment();  PathSegment(@NonNull PathSegment entityToClone, FlowPath path); @Builder  PathSegment(@NonNull Switch srcSwitch, @NonNull Switch destSwitch, int srcPort, int destPort,
                       boolean srcWithMultiTable, boolean destWithMultiTable, int seqId, Long latency, long bandwidth,
                       boolean ignoreBandwidth, boolean failed);  PathSegment(@NonNull PathSegmentData data); }
PathSegment implements CompositeDataEntity<PathSegment.PathSegmentData> { public boolean containsNode(SwitchId switchId, int port) { if (switchId == null) { throw new IllegalArgumentException("Switch id must be not null"); } return (switchId.equals(getSrcSwitchId()) && port == getSrcPort()) || (switchId.equals(getDestSwitchId()) && port == getDestPort()); } private  PathSegment();  PathSegment(@NonNull PathSegment entityToClone, FlowPath path); @Builder  PathSegment(@NonNull Switch srcSwitch, @NonNull Switch destSwitch, int srcPort, int destPort,
                       boolean srcWithMultiTable, boolean destWithMultiTable, int seqId, Long latency, long bandwidth,
                       boolean ignoreBandwidth, boolean failed);  PathSegment(@NonNull PathSegmentData data); boolean containsNode(SwitchId switchId, int port); @Override boolean equals(Object o); @Override int hashCode(); }
PathSegment implements CompositeDataEntity<PathSegment.PathSegmentData> { public boolean containsNode(SwitchId switchId, int port) { if (switchId == null) { throw new IllegalArgumentException("Switch id must be not null"); } return (switchId.equals(getSrcSwitchId()) && port == getSrcPort()) || (switchId.equals(getDestSwitchId()) && port == getDestPort()); } private  PathSegment();  PathSegment(@NonNull PathSegment entityToClone, FlowPath path); @Builder  PathSegment(@NonNull Switch srcSwitch, @NonNull Switch destSwitch, int srcPort, int destPort,
                       boolean srcWithMultiTable, boolean destWithMultiTable, int seqId, Long latency, long bandwidth,
                       boolean ignoreBandwidth, boolean failed);  PathSegment(@NonNull PathSegmentData data); boolean containsNode(SwitchId switchId, int port); @Override boolean equals(Object o); @Override int hashCode();  }