Examples of forEach()


Examples of com.goodow.realtime.json.JsonArray.forEach()

    if (indexReferences == null) {
      return;
    }
    JsonArray cursors = indexReferences.getArray(op.id);
    if (cursors != null) {
      cursors.forEach(new ListIterator<String>() {
        @Override
        public void call(int idx, String indexReferenceId) {
          IndexReferenceImpl indexReference = getObject(indexReferenceId);
          int currentIndex = indexReference.index();
          int newIndex = op.transformIndexReference(currentIndex, true,
View Full Code Here

Examples of com.sun.codemodel.JBlock.forEach()

                JVar marshaller = block.decl(mtype, "marsh",
                    JExpr.cast(mtype, JExpr.direct("context").invoke("get").arg(JExpr.lit(MarshallerImpl.MARSHALLER))));
               
                JExpression propValue = classBuilder.getObject().invoke(propName);
                if (prop.isCollection()) {
                        JForEach each = block.forEach(getGenericType(rawType), "_o", propValue);
                        JBlock newBody = each.body();
                        block = newBody;
                        propValue = each.var();
                    }
               
View Full Code Here

Examples of com.sun.codemodel.JBlock.forEach()

                        // get the value to evaluate
                        JExpression value;
                        if (!property.isCollection()) {
                            value = builder.getAttributeVar().invoke("getValue");
                        } else {
                            JForEach forEach = block.forEach(context.toJClass(String.class), builder.getReadVariableManager().createId(property.getName() + "Item"), builder.getAttributeVar().invoke("getXmlListValue"));
                            block = forEach.body();
                            value = forEach.var();
                        }
                       
                        // read and set
View Full Code Here

Examples of com.volantis.mcs.dom.NodeSequence.forEach()

        StrictStyledDOMHelper helper = new StrictStyledDOMHelper(null);

        String result;
        final Document doc = domFactory.createDocument();
        NodeSequence contents = buffer.removeContents();
        contents.forEach(new NodeIteratee() {
            public IterationAction next(Node node) {
                doc.addNode(node);
                return IterationAction.CONTINUE;
            }
        });
View Full Code Here

Examples of com.volantis.mcs.dom.impl.NodeSequenceImpl.forEach()

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        NodeSequence sequence = new NodeSequenceImpl(text1, text1);
        sequence.forEach(iterateeMock);
    }

    /**
     * Ensure that a sequence with multiple items visits each item once only.
     */
 
View Full Code Here

Examples of com.volantis.mcs.dom.impl.NodeSequenceImpl.forEach()

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        NodeSequence sequence = new NodeSequenceImpl(text1, text4);
        sequence.forEach(iterateeMock);
    }

    /**
     * Ensure that a sub sequence only visits the items in the sequence.
     */
 
View Full Code Here

Examples of com.volantis.mcs.dom.impl.NodeSequenceImpl.forEach()

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        NodeSequence sequence = new NodeSequenceImpl(text2, text3);
        sequence.forEach(iterateeMock);
    }
}
View Full Code Here

Examples of gnu.trove.TIntArrayList.forEach()

    final DFSTBuilder<Node> builder = new DFSTBuilder<Node>(graph);
    final TIntArrayList sccs = builder.getSCCs();

    final List<Chunk<Node>> chunks = new ArrayList<Chunk<Node>>(sccs.size());
    final Map<Node, Chunk<Node>> nodeToChunkMap = new LinkedHashMap<Node, Chunk<Node>>();
    sccs.forEach(new TIntProcedure() {
      int myTNumber = 0;
      public boolean execute(int size) {
        final Set<Node> chunkNodes = new LinkedHashSet<Node>();
        final Chunk<Node> chunk = new Chunk<Node>(chunkNodes);
        chunks.add(chunk);
View Full Code Here

Examples of gnu.trove.TLongCollection.forEach()

                return built;
            }
        }

        ForEach foreach = new ForEach();
        values.forEach( foreach );
        TLongList built = foreach.getBuilt();
        for ( int i = 0; i < values.size(); i++ ) {
            assertTrue( values.contains( built.get( i ) ) );
        }
    }
View Full Code Here

Examples of gnu.trove.list.TIntList.forEach()

                return built;
            }
        }

        ForEach foreach = new ForEach();
        a.forEach( foreach );
        TIntList built = foreach.getBuilt();
        assertEquals( a, built );
    }

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.