Package java.util

Examples of java.util.ArrayList.indexOf()


      //check the roleNames is not null before removing
      if (roleNames != null)
      {
         // roleName found remove it
         if (roleNames.indexOf(roleName) != -1) roleNames.remove(roleNames.indexOf(roleName));
         // no more references remove the relationId key
         if (roleNames.isEmpty()) mbeanReferenceMap.remove(relationId);
      }
      if (mbeanReferenceMap.isEmpty())
      {
View Full Code Here


      //check the roleNames is not null before removing
      if (roleNames != null)
      {
         // roleName found remove it
         if (roleNames.indexOf(roleName) != -1) roleNames.remove(roleNames.indexOf(roleName));
         // no more references remove the relationId key
         if (roleNames.isEmpty()) mbeanReferenceMap.remove(relationId);
      }
      if (mbeanReferenceMap.isEmpty())
      {
View Full Code Here

    }

    public String[] extractPerforceArgs(String[] args) {
        if (args != null && args.length > 0) {
            ArrayList<String> argList = new ArrayList(Arrays.asList(args));
            int pos = argList.indexOf("-p4");
            if (pos != -1) {
                List<String> p4CmdLine = new ArrayList<String>();
                p4CmdLine.addAll(argList.subList(pos+1, argList.size()));
                argList.subList(pos, argList.size()).clear();
View Full Code Here

            } finally {
                instructionAdditionAuditLog = null;
            }

            for (Object instr : oldInstructions) {
                int instrPos = newInstructions.indexOf(instr);
                if (instrPos == -1) {
                    // the existing instruction is no longer in the list of
                    // new instructions.  Delete it.
                    doDeleteInstruction((AbstractInstruction) instr);
                } else {
View Full Code Here

        {
            Plugin currentPlugin = (Plugin) it.next();

            if ( normalized.contains( currentPlugin ) )
            {
                int idx = normalized.indexOf( currentPlugin );
                Plugin firstPlugin = (Plugin) normalized.get( idx );

                mergePluginDefinitions( firstPlugin, currentPlugin, false );
            }
            else
View Full Code Here

                    continue;
                }
                tempBiGram = new BiGram();
                tempBiGram.setBiGram(pair);
                if (bigrams.contains(tempBiGram)) {
                    ((BiGram) bigrams.get(bigrams.indexOf(tempBiGram))).inCrementPositive();
                } else {
                    tempBiGram.setPositiveCount(1);
                    bigrams.add(tempBiGram);
                }
            }
View Full Code Here

                    continue;
                }
                tempBiGram = new BiGram();
                tempBiGram.setBiGram(pair);
                if (bigrams.contains(tempBiGram)) {
                    ((BiGram) bigrams.get(bigrams.indexOf(tempBiGram))).inCrementNegative();
                } else {
                    tempBiGram.setNegativeCount(1);
                    bigrams.add(tempBiGram);
                }
            }
View Full Code Here

                    continue;
                }
                tempUniGram = new UniGram();
                tempUniGram.setUniGram(word);
                if (unigrams.contains(tempUniGram)) {
                    ((UniGram) unigrams.get(unigrams.indexOf(tempUniGram))).inCrementPositive();
                } else {
                    tempUniGram.setPositiveCount(1);
                    unigrams.add(tempUniGram);
                }
            }
View Full Code Here

                    continue;
                }
                tempUniGram = new UniGram();
                tempUniGram.setUniGram(word);
                if (unigrams.contains(tempUniGram)) {
                    ((UniGram) unigrams.get(unigrams.indexOf(tempUniGram))).inCrementNegative();
                } else {
                    tempUniGram.setNegativeCount(1);
                    unigrams.add(tempUniGram);
                }
            }
View Full Code Here

        UTF8.setName("utf-8");
        UTF8.setMIBenum(106);
        UTF8.setPreload(true);
        UTF8.setComplete(true);
       
        int utf8Index = charset.indexOf(UTF8);
       
        Charset cs = (Charset) charset.get(utf8Index);
        assertNotNull("No utf8 charset in map", cs);
       
        assertEquals("UTF-8 charset not correctly configured", cs.getName(), "utf-8");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.