Examples of forEach()


Examples of gnu.trove.set.TIntSet.forEach()

            }
        }

        ForEach procedure = new ForEach();

        set.forEach( procedure );
        TIntSet built = procedure.getBuilt();

        assertEquals( "inequal sizes: " + set + ", " + built, set.size(), built.size() );
        assertTrue( "inequal sets: " + set + ", " + built, set.equals( built ) );
    }
View Full Code Here

Examples of gnu.trove.set.TIntSet.forEach()

      // Close active method calls
      call_wait_map_lock.lock();
      try {
        TIntSet call_id_set = vmid_call_wait_map.get( vmid );
        if ( call_id_set != null && !call_id_set.isEmpty() ) {
          call_id_set.forEach( new CallInterruptProcedure() );
        }
      }
      finally {
        call_wait_map_lock.unlock();
      }
View Full Code Here

Examples of gnu.trove.set.TIntSet.forEach()

            }
        }

        ForEach procedure = new ForEach();

        set.forEach(procedure);
        TIntSet built = procedure.getBuilt();

        assertEquals("inequal sizes: " + set + ", " + built, set.size(), built.size());
        assertTrue("inequal sets: " + set + ", " + built, set.equals(built));
    }
View Full Code Here

Examples of gnu.trove.set.TLongSet.forEach()

                    keys.add(mapKey);
                    return false;
                }
            });
        }
        keys.forEach(new TLongProcedure() {
            @SuppressWarnings("unchecked")
            @Override
            public boolean execute(long key) {
                // Note: bins have been initialized in the previous visit
                bins.get(key).add((T) item);
View Full Code Here

Examples of gnu.trove.set.hash.TLongHashSet.forEach()

                    keys.add(mapKey);
                    return false;
                }
            });
        }
        keys.forEach(new TLongProcedure() {
            @SuppressWarnings("unchecked")
            @Override
            public boolean execute(long key) {
                // Note: bins have been initialized in the previous visit
                bins.get(key).add((T) item);
View Full Code Here

Examples of java.util.Properties.forEach()

  }
 
  public void collect(Reader reader) throws IOException {
    Properties p = new Properties();
    p.load(reader);
    p.forEach((k, v) -> collect((String) k, (String) v));
  }
 
  public void collect(String key, String value) {
    MessageType current = getRoot();
    String[] parts = key.split("\\.");
View Full Code Here

Examples of org.jboss.errai.codegen.builder.ContextualStatementBuilder.foreach()

          if (isListOrSet(queryParamType)) {
            MetaClass paramType = assertValidCollectionParam(queryParamType, queryParamName, QueryParam.class);
            ContextualStatementBuilder listParam = (queryParam instanceof Parameter) ?
                Stmt.loadVariable(((Parameter) queryParam).getName()) : Stmt.nestedCall(queryParam);

            block.addStatement(listParam.foreach("p")
                .append(If.not(Stmt.loadVariable("url").invoke("toString").invoke("endsWith", "?"))
                    .append(Stmt.loadVariable("url").invoke(APPEND, "&")).finish())
                .append(Stmt.loadVariable("url").invoke(APPEND, queryParamName).invoke(APPEND, "=")
                    .invoke(APPEND, encodeQuery(marshal(paramType, Stmt.loadVariable("p")))))
                .finish()
View Full Code Here

Examples of org.jboss.errai.codegen.builder.ContextualStatementBuilder.foreach()

          if (isListOrSet(queryParamType)) {
            MetaClass paramType = assertValidCollectionParam(queryParamType, queryParamName, QueryParam.class);
            ContextualStatementBuilder listParam = (queryParam instanceof Parameter) ?
                Stmt.loadVariable(((Parameter) queryParam).getName()) : Stmt.nestedCall(queryParam);

            block.addStatement(listParam.foreach("p")
                .append(If.not(Stmt.loadVariable("url").invoke("toString").invoke("endsWith", "?"))
                    .append(Stmt.loadVariable("url").invoke(APPEND, "&")).finish())
                .append(Stmt.loadVariable("url").invoke(APPEND, queryParamName).invoke(APPEND, "=")
                    .invoke(APPEND, encodeQuery(marshal(paramType, Stmt.loadVariable("p")))))
                .finish()
View Full Code Here

Examples of org.jboss.errai.codegen.builder.ContextualStatementBuilder.foreach()

          if (isListOrSet(queryParamType)) {
            MetaClass paramType = assertValidCollectionParam(queryParamType, queryParamName, QueryParam.class);
            ContextualStatementBuilder listParam = (queryParam instanceof Parameter) ?
                Stmt.loadVariable(((Parameter) queryParam).getName()) : Stmt.nestedCall(queryParam);
           
            block.addStatement(listParam.foreach("p")
                .append(If.not(Stmt.loadVariable("url").invoke("toString").invoke("endsWith", "?"))
                    .append(Stmt.loadVariable("url").invoke(APPEND, "&")).finish())
                .append(Stmt.loadVariable("url").invoke(APPEND, queryParamName).invoke(APPEND, "=")
                    .invoke(APPEND, encodeQuery(marshal(paramType, Stmt.loadVariable("p")))))
                .finish()
View Full Code Here

Examples of org.jsoup.select.Elements.forEach()

        toc.select("li > ul.sectlevel2").forEach(subsection ->
            subsection.parent().remove()
        );

        toc.forEach(part ->
            part.select("a[href]").stream()
                .filter(anchor ->
                        doc.select(anchor.attr("href")).get(0).parent().classNames().stream()
                                .anyMatch(clazz -> clazz.startsWith("reveal")))
                .forEach(href -> href.parent().remove())
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.