public void setSwingDataCollection(Collection<ICFInternetVersionObj> value) { final String S_ProcName = "setSwingDataCollection"; swingDataCollection = value; if (swingDataCollection == null) { arrayOfVersion = new ICFInternetVersionObj[0]; } else { int len = value.size(); arrayOfVersion = new ICFInternetVersionObj[len]; Iterator<ICFInternetVersionObj> iter = swingDataCollection.iterator(); int idx = 0; while (iter.hasNext() && (idx < len)) { arrayOfVersion[idx++] = iter.next(); } if (idx < len) { throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Collection iterator did not fully populate the array copy"); } if (iter.hasNext()) { throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Collection iterator had left over items when done populating array copy"); } Arrays.sort(arrayOfVersion, compareVersionByQualName); } ListTableModel tblDataModel = getDataModel(); if (tblDataModel != null) { tblDataModel.fireTableDataChanged(); } }
public CFAccRamVersionCursor( CFSecurityAuthorization argAuthorization, ICFInternetSchema argSchema, Collection<CFInternetVersionBuff> cltn) { super(argAuthorization, argSchema, "", cltn.size()); values = cltn; cursor = values.iterator(); }
public void reset() { super.reset(); cursor = values.iterator(); }