Package java.util

Examples of java.util.List.indexOf()


        List list = new ArrayList(set);
        int beforeIndex = list.indexOf(before);
        assertTrue("Expected " + before + " to be contained in the list " + list,
                beforeIndex >= 0);

        int afterIndex = list.indexOf(after);
        assertTrue("Expected " + after + " to be contained in the list " + list,
                afterIndex >= 0);

        assertTrue("Expected " + before + " to be before " + after + " in the list " + list,
                beforeIndex < afterIndex);
View Full Code Here


        List revisions = new ArrayList(report.getConfigurationReport("default")
                .getModuleRevisionIds());
        assertTrue("number of revisions is not correct", revisions.size() >= 3);

        int mod12Index = revisions.indexOf(ModuleRevisionId.newInstance("org1", "mod1.2", "1.1"));
        int mod32Index = revisions.indexOf(ModuleRevisionId.newInstance("org3", "mod3.2", "1.4"));
        int mod51Index = revisions.indexOf(ModuleRevisionId.newInstance("org5", "mod5.1", "4.2"));

        // verify the order of the modules in the ivy file
        assertTrue("[ org1 | mod1.2 | 1.1 ] was not found", mod12Index > -1);
View Full Code Here

        List revisions = new ArrayList(report.getConfigurationReport("default")
                .getModuleRevisionIds());
        assertTrue("number of revisions is not correct", revisions.size() >= 3);

        int mod12Index = revisions.indexOf(ModuleRevisionId.newInstance("org1", "mod1.2", "1.1"));
        int mod32Index = revisions.indexOf(ModuleRevisionId.newInstance("org3", "mod3.2", "1.4"));
        int mod51Index = revisions.indexOf(ModuleRevisionId.newInstance("org5", "mod5.1", "4.2"));

        // verify the order of the modules in the ivy file
        assertTrue("[ org1 | mod1.2 | 1.1 ] was not found", mod12Index > -1);
        assertTrue("[ org1 | mod1.2 | 1.1 ] must come before [ org3 | mod3.2 | 1.4 ]",
View Full Code Here

                .getModuleRevisionIds());
        assertTrue("number of revisions is not correct", revisions.size() >= 3);

        int mod12Index = revisions.indexOf(ModuleRevisionId.newInstance("org1", "mod1.2", "1.1"));
        int mod32Index = revisions.indexOf(ModuleRevisionId.newInstance("org3", "mod3.2", "1.4"));
        int mod51Index = revisions.indexOf(ModuleRevisionId.newInstance("org5", "mod5.1", "4.2"));

        // verify the order of the modules in the ivy file
        assertTrue("[ org1 | mod1.2 | 1.1 ] was not found", mod12Index > -1);
        assertTrue("[ org1 | mod1.2 | 1.1 ] must come before [ org3 | mod3.2 | 1.4 ]",
            mod12Index < mod32Index);
View Full Code Here

          SanityManager.ASSERT(lockInGroup.equals(firstGrant));
        }
        lockInSet = firstGrant;
      } else {
        // index = lgranted.indexOf(index, lgranted.size() - 1, lockInGroup);
        /*List*/ index = lgranted.indexOf(lockInGroup);
     
        if (SanityManager.DEBUG) {
          SanityManager.ASSERT(index != -1);
        }
        lockInSet = (Lock) lgranted.get(index);
View Full Code Here

        StandaloneRetrieveSetup setup = (StandaloneRetrieveSetup) selection.getFirstElement();
        EditStandaloneRetrieveDialog editDialog = new EditStandaloneRetrieveDialog(getShell(),
                project, setup);
        if (editDialog.open() == Window.OK) {
            List list = ((List) table.getInput());
            list.set(list.indexOf(setup), editDialog.getStandaloneRetrieveSetup());
            table.refresh();
        }
    }

    private class RetrieveTableLabelProvider extends BaseLabelProvider implements
View Full Code Here

          SanityManager.ASSERT(lockInGroup.equals(firstGrant));
        }
        lockInSet = firstGrant;
      } else {
        // index = lgranted.indexOf(index, lgranted.size() - 1, lockInGroup);
        /*List*/ index = lgranted.indexOf(lockInGroup);
     
        if (SanityManager.DEBUG) {
          SanityManager.ASSERT(index != -1);
        }
        lockInSet = (Lock) lgranted.get(index);
View Full Code Here

        StringBuffer result = new StringBuffer();

        List folders = getPathFolders();

        int index = folders.indexOf(folder);

        if (index == -1) {
            throw new IllegalArgumentException(
                    "The specified folder is not on this file's path: "
                            + folder);
View Full Code Here

      if ( ! nameList.contains( thisEntityName ) ) {
        // we have not, so create the proper entries in nameList and positionToAction
        ArrayList segmentedActionQueue = new ArrayList();
        segmentedActionQueue.add( action );
        nameList.add( thisEntityName );
        positionToAction.put( new Integer( nameList.indexOf( thisEntityName ) ), segmentedActionQueue );
      }
      else {
        // we have seen it before, so we need to determine if this insert action is
        // is depenedent upon a previously processed action in terms of FK
        // relationships (this FK checking is done against the entity's property-state
View Full Code Here

            List sortedParts = Arrays.asList(sortedPartsArray);
            for (int i = 0; i < parts.length; i++) {
                if (parts[i] instanceof PartPane) {
                    IWorkbenchPartReference part = ((PartPane) parts[i])
                            .getPartReference();
                    int index = sortedParts.indexOf(part);
                    if (index >= topIndex) {
                        topIndex = index;
                        selPart = (PartPane) parts[i];
                    }
                }
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.