/** * adds the index to the list, ONLY IF it is not contained in the list yet. * * @param index */ public void addUnkIndex(UInteger index) { if (!this.unkIndexList.contains(index)) { this.unkIndexList.add(index); } }
/** * adds the index to the list, ONLY IF it is not contained in the list yet. * * @param index */ public void addInvIndex(UInteger index) { if (!this.invIndexList.contains(index)) { this.invIndexList.add(index); } }
/** * This method adds all numbers to the invIndexList, which have a higher * number than the number of the smaller of the two sizes * * @param firstList * @param secondList * @param invIndexList * @return the modified invIndexList */ private UIntegerList getInvalidIndexes(int size1, int size2) { UIntegerList invIndexList = new UIntegerList(); // requirement: 3.5.17.2.g int min = Math.min(size1, size2); int max = Math.max(size1, size2); for (; min < max; min++) { invIndexList.add(new UInteger(min)); } return invIndexList; }
public UIntegerList getMissingIndexes() { UIntegerList missingIndexes = new UIntegerList(); long nOfChunks = numberOfChunks.getValue(); for (int i = 0; i < nOfChunks; i++) { if (receivedChunks.get(i) == null) { missingIndexes.add(new UInteger()); } } return missingIndexes; }
public static UIntegerList checkForDuplicates(ArchiveDetailsList archiveDetailsList) { UIntegerList dupList = new UIntegerList(); for (int i = 0; i < archiveDetailsList.size() - 1; i++) { if (archiveDetailsList.get(i).getInstId().intValue() == 0) { // Wildcard? Then jump over it continue; } for (int j = i + 1; j < archiveDetailsList.size(); j++) { if (archiveDetailsList.get(i).getInstId().intValue() == archiveDetailsList.get(j).getInstId().intValue()) { dupList.add(new UInteger(j)); } } } return dupList; }
private void publishActionFailureEvent(final UInteger errorNumber, final Long related, final ObjectId source, final MALInteraction interaction, final SingleConnectionDetails connectionDetails) { // requirement: 3.2.5.f final UIntegerList errorNumbers = new UIntegerList(1); errorNumbers.add(errorNumber); // requirement: 3.2.5.c and 3.2.5.d and 3.2.5.e if (this.getEventService() != null) { Long objId = this.getEventService().generateAndStoreEvent( ActionHelper.ACTIONFAILURE_OBJECT_TYPE, ConfigurationProviderSingleton.getDomain(), errorNumber, related, source, interaction); try { this.getEventService().publishEvent(new URI(""), objId, ActionHelper.ACTIONFAILURE_OBJECT_TYPE, related, source, errorNumbers); } catch (IOException ex) { Logger.getLogger(ActionManager.class.getName()).log(Level.SEVERE, null, ex); } } }
unkIndexList.add(new UInteger(i)); } else {
unkIndexList.add(new UInteger(i)); } else {
unkIndexList.add(new UInteger(index)); continue; } else {
unkIndexList.add(new UInteger(index)); // requirement: 3.4.12.2.c } else { removalLst.add(identityId);
unkIndexList.add(new UInteger(index)); // requirement: 3.2.14.2.c } else { tempIdentityLst.add(tempIdentity);
tempIdsToRemoveLst.add(tempLong); } else { unkIndexList.add(new UInteger(index)); // requirement: 3.6.15.2.c
unkIndexList.add(new UInteger(index)); } else { removalLst.add(identityId);
unkIndexList.add(new UInteger(index)); // Throw an UNKNOWN error
unkIndexList.add(new UInteger(index)); // requirement: 3.7.8.2.d continue;
tempCheckLinkIds.add(checkLinkId); } else { unkIndexList.add(new UInteger(index)); // requirement: 3.5.19.2.d
unkIndexList.add(new UInteger(i));