Examples of first()


Examples of org.allspice.parser.generation.FirstImpl.first()

        new Rule("T'","T")),
        new Tree23Map<String,AssocType>(),
        new Tree23Map<String,Integer>(),
        new Tree23Map<Rule,Integer>()) ;
    FirstStrategy ff = new FirstImpl(g) ;
    Set<String> f = ff.first("T'");
    assertEquals(f,new HashSet<String>(Arrays.asList("T"))) ;
  }
  /**
   * @throws StrandedSymbol
   * @throws InvalidStartRule
View Full Code Here

Examples of org.allspice.parser.generation.FirstStrategy.first()

        new Rule("T'","T")),
        new Tree23Map<String,AssocType>(),
        new Tree23Map<String,Integer>(),
        new Tree23Map<Rule,Integer>()) ;
    FirstStrategy ff = new FirstImpl(g) ;
    Set<String> f = ff.first("T'");
    assertEquals(f,new HashSet<String>(Arrays.asList("T"))) ;
  }
  /**
   * @throws StrandedSymbol
   * @throws InvalidStartRule
View Full Code Here

Examples of org.apache.batik.gvt.text.AttributedCharacterSpanIterator.first()

         */
        for (int i=0; i<textRuns.size(); ++i) {
            TextRun textRun = (TextRun) textRuns.get(i);
            AttributedCharacterIterator runaci = textRun.getACI();
            TextLayout layout = textRun.getLayout();
            runaci.first();
            //System.out.print("Painting text: ");
            //for (int j=runaci.getBeginIndex(); j<runaci.getEndIndex(); ++j) {
            //    System.out.print(runaci.setIndex(j));
            //}
            //System.out.println("");
View Full Code Here

Examples of org.apache.commons.collections.SortedBag.first()

        String two = "two";
        String three = "three";
        bag.add(one);
        bag.add(two);
        bag.add(three);
        assertEquals("first element", bag.first(), one);
        assertEquals("last element", bag.last(), two);
        Comparator c = bag.comparator();
        assertTrue("natural order, so comparator should be null", c == null);
    }
View Full Code Here

Examples of org.apache.commons.collections15.SortedBag.first()

        String two = "two";
        String three = "three";
        bag.add(one);
        bag.add(two);
        bag.add(three);
        assertEquals("first element", bag.first(), one);
        assertEquals("last element", bag.last(), two);
        Comparator c = bag.comparator();
        assertTrue("natural order, so comparator should be null", c == null);
    }
View Full Code Here

Examples of org.apache.crunch.Pair.first()

            Path outputPath = new Path(path, "out" + outputIndex + ".txt");
            FSDataOutputStream os = fs.create(outputPath);
            if (collection instanceof PTable) {
              for (Object o : collection.materialize()) {
                Pair p = (Pair) o;
                os.writeBytes(p.first().toString());
                os.writeBytes("\t");
                os.writeBytes(p.second().toString());
                os.writeBytes("\r\n");
              }
            } else {
View Full Code Here

Examples of org.apache.directory.server.core.api.filtering.EntryFilteringCursor.first()

        ExprNode filter = new EqualityNode<String>( storeProcUnitNamAT,
            new StringValue( storeProcUnitNamAT, spUnitName ) );
        Dn dn = session.getDirectoryService().getDnFactory().create( storedProcContainer );
        EntryFilteringCursor results = session.search( dn, SearchScope.SUBTREE, filter,
            AliasDerefMode.DEREF_ALWAYS, EMPTY_ATTRIBS );
        if ( results.first() )
        {
            Entry entry = results.get();
            results.close();

            return entry;
View Full Code Here

Examples of org.apache.directory.server.core.filtering.EntryFilteringCursor.first()

            .getSchemaManager().lookupAttributeTypeRegistry( "storedProcUnitName" );
        ExprNode filter = new EqualityNode<String>( "storedProcUnitName", new ServerStringValue( at, spUnitName ) );
        DN dn = new DN( storedProcContainer );
        EntryFilteringCursor results = session.search( dn, SearchScope.SUBTREE, filter,
            AliasDerefMode.DEREF_ALWAYS, EMPTY_ATTRIBS );
        if ( results.first() )
        {
            ClonedServerEntry entry = results.get();
            results.close();
            return entry;
        }
View Full Code Here

Examples of org.apache.directory.server.xdbm.search.cursor.PresenceCursor.first()

        assertEquals( Strings.getUUID( 11 ), cursor.get().getId() );
        assertFalse( cursor.next() );
        assertFalse( cursor.available() );

        // test first()
        cursor.first();
        assertTrue( cursor.available() );
        assertEquals( SchemaConstants.CN_AT_OID, cursor.get().getKey() );

        // test last()
        cursor.last();
View Full Code Here

Examples of org.apache.directory.server.xdbm.search.cursor.SubstringCursor.first()

        cursor.close();

        // ---------- test first ----------

        cursor = new SubstringCursor( store, evaluator );
        cursor.first();

        assertTrue( cursor.available() );
        assertEquals( Strings.getUUID( 5 ), cursor.get().getId() );
        assertEquals( "walker", cursor.get().getKey() );
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.