package gov.hhs.fha.nhinc.connectmgr.data; import java.util.List; import java.util.ArrayList; /** * @author Les Westberg */ public class CMInternalConnectionInfos { private List internalConnectionInfoList = new ArrayList(); /** * Default Constructor. */ public CMInternalConnectionInfos() { clear(); } /** * Clear the contents of this and set it to a default state. */ public void clear() { internalConnectionInfoList = new ArrayList(); } /** * Returns true of the contents of the object are the same as the one * passed in. * * @param oCompare The object to compare. * @return TRUE if the contents are the same as the one passed in. */ public boolean equals(CMInternalConnectionInfos oCompare) { if (oCompare.internalConnectionInfoList.size() != this.internalConnectionInfoList.size()) { return false; } int iCnt = this.internalConnectionInfoList.size(); for (int i = 0; i < iCnt; i++) { if (! this.internalConnectionInfoList.get(i).equals(oCompare.internalConnectionInfoList.get(i))) { return false; } } // If we got here then everything is the same... //---------------------------------------------- return true; } /** * This returns a list of InternalConnectionInfo objects. * * @return The list of internal conneciton info objects. */ public List getInternalConnectionInfo() { return internalConnectionInfoList; } }