for (Iterator<?> i = sourceCell.getPort().edges(); i.hasNext();)
{
Object o = i.next();
if (o instanceof Edge)
{
Edge e = (Edge)o;
if ((e.getSource()==sourceCell.getPort())&&
(e.getTarget()!=targetCell.getPort()))
++nNumOutgoing;
}
}
result = (nNumOutgoing == 0);
}
if (targetCell.getType()==AbstractPetriNetElementModel.SUBP_TYPE)
{
int nNumIncoming = 0;
for (Iterator<?> i = targetCell.getPort().edges(); i.hasNext();)
{
Object o = i.next();
if (o instanceof Edge)
{
Edge e = (Edge)o;
if ((e.getTarget()==targetCell.getPort())&&
(e.getSource()!=sourceCell.getPort()))
++nNumIncoming;
}
}
result = (nNumIncoming == 0);
}