Examples of index()


Examples of krati.store.ArrayStoreIterator.index()

        assertEquals(randomIndex, iter1.index());
        assertEquals(randomIndex, iter1.next().intValue());
       
        // Test ArrayStoreIndexIterator
        ArrayStoreIterator iter2 = new ArrayStoreIterator(_store);
        assertEquals(_store.getIndexStart(), iter2.index());
        assertTrue(iter2.hasNext());
       
        int cnt2 = 0;
        while(iter2.hasNext()) {
            iter2.next();
View Full Code Here

Examples of lius.index.JCR.JCRIndexer.index()

                 Folder folder = (Folder) it.next();
                 Session jcrSession = (Session) DatabaseUtil.getSingleton().getDaoSession();
                
                 indexer.setJcrNode(jcrSession.getNodeByUUID(folder.getId()));
                 try {
                     indexer.index(IndexerServlet.getIndexDir());
                 } catch (Exception e) {
                     e.printStackTrace();
                 }

                 //IndexEventListener.getInstance()
View Full Code Here

Examples of net.fec.openrq.util.linearalgebra.io.ByteVectorIterator.index()

        ByteVector result = a.copy(factory);
        ByteVectorIterator it = b.nonZeroIterator();
        while (it.hasNext()) {
            it.next();
            result.update(it.index(), ByteVectors.asMinusFunction(it.get()));
        }
        return result;
    }
}
View Full Code Here

Examples of net.glowstone.GlowChunk.ChunkSection.index()

    }

    @Override
    public int getBlockTypeId(int x, int y, int z) {
        ChunkSection section = getSection(y);
        return section == null ? 0 : section.types[section.index(x, y, z)] >> 4;
    }

    @Override
    public int getBlockData(int x, int y, int z) {
        ChunkSection section = getSection(y);
View Full Code Here

Examples of net.jcores.jre.cores.CoreString.index()

    /** */
    @Test
    public void testIndex() {
        final CoreString cs = $(Data.sn);
        Assert.assertEquals(2, cs.index("2").i(0));
        Assert.assertEquals(20, cs.index("10", "20").i(1));
    }

    /** */
    @Test
View Full Code Here

Examples of no.uib.cipr.matrix.VectorEntry.index()

    assertTrue(vectorTF.getUsed() == 2)// vectorTF.getUsed() returns 5

    for (Iterator<VectorEntry> it = vectorTF.iterator();it.hasNext();) {
            VectorEntry ve= it.next();
            int index = ve.index();
            double value = ve.get();
            assertTrue(tfVector[index]== value);
        }
  }
}
View Full Code Here

Examples of org.antlr.runtime.CommonTokenStream.index()

            }
        }


        /** Invalid input */
        if ( tokens.index()!=tokens.size() ) {
            throw new RuntimeException("Invalid input.");
        }

        /** Check for syntax errors */
        if (((BaseRecognizer)parObj).getNumberOfSyntaxErrors() > 0) {
View Full Code Here

Examples of org.antlr.runtime.TokenStream.index()

     * @param builder the <code>StringBuilder</code> used to build the error message
     */
    private void appendQuerySnippet(Parser parser, StringBuilder builder)
    {
        TokenStream tokenStream = parser.getTokenStream();
        int index = tokenStream.index();
        int size = tokenStream.size();

        Token from = tokenStream.get(getSnippetFirstTokenIndex(index));
        Token to = tokenStream.get(getSnippetLastTokenIndex(index, size));
        Token offending = tokenStream.get(getOffendingTokenIndex(index, size));
View Full Code Here

Examples of org.antlr.runtime.tree.TreeWizard.index()

  }

  @Test public void testSingleNodeIndex() throws Exception {
    TreeWizard wiz = new TreeWizard(adaptor, tokens);
    CommonTree t = (CommonTree)wiz.create("ID");
    Map<Integer, List<Object>> m = wiz.index(t);
    String found = m.toString();
    String expecting = "{10=[ID]}";
    assertEquals(expecting, found);
  }
View Full Code Here

Examples of org.antlr.runtime3_3_0.TokenStream.index()

    stats.numDecisionEvents++;
    int startingLookaheadIndex = parser.getTokenStream().index();
    TokenStream input = parser.getTokenStream();
    if ( dump ) System.out.println("enterDecision canBacktrack="+couldBacktrack+" "+ decisionNumber +
               " backtrack depth " + backtrackDepth +
               " @ " + input.get(input.index()) +
               " rule " +locationDescription());
    String g = (String) currentGrammarFileName.peek();
    DecisionDescriptor descriptor = decisions.get(g, decisionNumber);
    if ( descriptor == null ) {
      descriptor = new DecisionDescriptor();
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.