List of usage examples for java.lang System equals
public boolean equals(Object obj)
From source file:org.opennaas.extensions.roadm.wonesys.commandsets.commands.psroadm.SetChannel.java
/** * //from w w w . j a v a 2 s . co m * @param srcPort * @return true if given port has connections and all of them are connected to ports in the same System than given port, or false otherwise. */ private static boolean isLocallyConnectedOnly(NetworkPort srcPort) { org.opennaas.extensions.router.model.System srcPortSystem = srcPort.getModule().getSystems().get(0); if (srcPort.getOutgoingDeviceConnections().isEmpty()) return false; for (LogicalDevice otherPort : srcPort.getOutgoingDeviceConnections()) { if (otherPort instanceof NetworkPort) { org.opennaas.extensions.router.model.System otherPortSystem = ((NetworkPort) otherPort).getModule() .getSystems().get(0); if (!srcPortSystem.equals(otherPortSystem)) return false; } } return true; }