1 2 package SOFA.SOFAnode.Made.CDL; 3 4 public class DetectedConnectors extends java.util.ArrayList { 5 public DetectedConnector getConn(int i) { return (DetectedConnector) get(i); } 6 7 public DetectedConnector containsConnWithCRole(CompBindOper cR) { 8 DetectedConnector ret; 9 for (int i=0; i<size(); i++) { 10 ret = getConn(i); 11 12 if (ret.containsSameCRole(cR)) { 13 return ret; 14 } 15 } 16 return null; 17 } 18 19 public DetectedConnector containsConnWithSRole(CompBindOper sR) { 20 DetectedConnector ret; 21 for (int i=0; i<size(); i++) { 22 ret = getConn(i); 23 24 if (ret.containsSameSRole(sR)) { 25 return ret; 26 } 27 } 28 return null; 29 } 30 31 32 public int numOfBind() { 33 int ret = 0; 34 for (int i=0; i<size(); i++) { 35 if (getConn(i).bindMode == CompBind.m_bind) 36 ret++; 37 } 38 return ret; 39 } 40 } 41 | Popular Tags |