Examples of indexOf()


Examples of org.apache.commons.collections.map.LinkedMap.indexOf()

            Object[] arr = new Object[userParams.size()];
            int base = positionalParameterBase(userParams.keySet());
            for (Object key : paramTypes.keySet()) {
                int idx = (key instanceof Integer)
                    ? ((Integer)key).intValue() - base
                    : paramTypes.indexOf(key);
                if (idx >= arr.length || idx < 0)
                        throw new UserException(_loc.get("gap-query-param",
                            new Object[]{q.getContext().getQueryString(), key,
                            userParams.size(), userParams}));
                    arr[idx] = userParams.get(key);
View Full Code Here

Examples of org.apache.commons.collections.map.ListOrderedMap.indexOf()

            // Added nodes
            for (String s : added) {
                if (s.equals(uuids2.lastKey())) {
                    diffs.add(new ChildAddedDiff(s, addPath(basePath, (String) uuids2.get(s)), null));
                } else {
                    diffs.add(new ChildAddedDiff(s, addPath(basePath, (String) uuids2.get(s)), (String) uuids2.get(uuids2.get(uuids2.indexOf(s)+1))));
                }
            }
        }

        PropertyIterator pi1 = frozenNode.getProperties();
View Full Code Here

Examples of org.apache.ctakes.dependency.parser.util.DependencyPath.indexOf()

        vfeat.put(DONOR_TOKEN, true);
       
        // check if there are one-removed dependencies on the dependency path
        DependencyPath path = DependencyUtility.getPath(jCas, DependencyUtility.getNominalHeadNode(jCas,tok),
            DependencyUtility.getNominalHeadNode(jCas,mention));
        int commonInd = path.indexOf(path.getCommonNode());
        if (commonInd==1 || commonInd==path.size()-2) {
          vfeat.put(DONOR_DEPTOK, true);
        }
      }
      if ( isFamilyTerm(tok) ) {
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.ConnectionManager.indexOf()

                IConnection[] connections = ( IConnection[] ) event.data;
                IConnection targetConnection = ( IConnection ) event.item.getData();

                if ( event.detail == DND.DROP_MOVE )
                {
                    boolean fromTop = connectionManager.indexOf( connections[0] ) < connectionManager
                        .indexOf( targetConnection );
                    for ( int i = 0; i < connections.length; i++ )
                    {
                        connectionManager.removeConnection( connections[i] );
                    }
View Full Code Here

Examples of org.apache.directory.studio.connection.core.ConnectionManager.indexOf()

                Connection[] connections = ( Connection[] ) event.data;
                Connection targetConnection = ( Connection ) event.item.getData();

                if ( event.detail == DND.DROP_MOVE )
                {
                    boolean fromTop = connectionManager.indexOf( connections[0] ) < connectionManager
                        .indexOf( targetConnection );
                    for ( int i = 0; i < connections.length; i++ )
                    {
                        connectionManager.removeConnection( connections[i] );
                    }
View Full Code Here

Examples of org.apache.flex.forks.batik.gvt.CompositeGraphicsNode.indexOf()

                                continue;
                            Element pse = (Element)ps;
                            GraphicsNode gn = getGraphicsNode(pse);
                            if (gn == null)
                                continue;
                            idx = parent.indexOf(gn);
                            if (idx == -1)
                                continue;
                            break;
                        }
                        // insert after prevSibling, if
View Full Code Here

Examples of org.apache.harmony.pack200.bytecode.ClassConstantPool.indexOf()

      debug(String.valueOf(i) + ":" + String.valueOf(cp.get(i)));
    }
    // NOTE the indexOf is only valid after the cp.resolve()
    // build up remainder of file
    classFile.accessFlags = (int) classBands.getClassFlags()[classNum];
    classFile.thisClass = cp.indexOf(cfThis);
    classFile.superClass = cp.indexOf(cfSuper);
    // TODO placate format of file for writing purposes
    classFile.interfaces = new int[cfInterfaces.length];
    for (i = 0; i < cfInterfaces.length; i++) {
      classFile.interfaces[i] = cp.indexOf(cfInterfaces[i]);
View Full Code Here

Examples of org.apache.harmony.unpack200.bytecode.ClassConstantPool.indexOf()

        // sort CP according to cp_All
        cp.resolve(this);
        // NOTE the indexOf is only valid after the cp.resolve()
        // build up remainder of file
        classFile.accessFlags = (int) classBands.getClassFlags()[classNum];
        classFile.thisClass = cp.indexOf(cfThis);
        classFile.superClass = cp.indexOf(cfSuper);
        // TODO placate format of file for writing purposes
        classFile.interfaces = new int[cfInterfaces.length];
        for (i = 0; i < cfInterfaces.length; i++) {
            classFile.interfaces[i] = cp.indexOf(cfInterfaces[i]);
View Full Code Here

Examples of org.apache.http.io.CharArrayBuffer.indexOf()

    }

    public void testIndexOf() {
        CharArrayBuffer buffer = new CharArrayBuffer(16);
        buffer.append("name: value");
        assertEquals(4, buffer.indexOf(':'));
        assertEquals(-1, buffer.indexOf(','));
        assertEquals(4, buffer.indexOf(':', -1, 11));
        assertEquals(4, buffer.indexOf(':', 0, 1000));
        assertEquals(-1, buffer.indexOf(':', 2, 1));
    }
View Full Code Here

Examples of org.apache.http.util.ByteArrayBuffer.indexOf()

        int index2 = 20;
      
        ByteArrayBuffer buffer = new ByteArrayBuffer(16);
        buffer.append(bytes, 0, bytes.length);

        assertEquals(index1, buffer.indexOf(COLON));
        assertEquals(-1, buffer.indexOf(COMMA));
        assertEquals(index1, buffer.indexOf(COLON, -1, 11));
        assertEquals(index1, buffer.indexOf(COLON, 0, 1000));
        assertEquals(-1, buffer.indexOf(COLON, 2, 1));
        assertEquals(index2, buffer.indexOf(COLON, index1 + 1, buffer.length()));
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.