if (candidate instanceof Port) {
boolean foundPort = false;
actualPort = (Port) candidate;
if (actualPort == null) {
throw new InternalErrorException(
"The target contains a null Port.");
}
for (int i = 0; i < _ports.size(); i++) {
Hashtable portInfo = (Hashtable) (_ports.elementAt(i));
if (actualPort == ((Port) portInfo
.get(ColumnNames.COL_ACTUAL_PORT))) {
foundPort = true;
break;
}
}
if (!foundPort) {
portsToBeRemoved.add(actualPort);
}
} else {
throw new InternalErrorException("The target portList contains"
+ " an object that is not of type Port.");
}
}
Iterator actualPorts = portsToBeRemoved.iterator();