Examples of Iter


Examples of dovetaildb.iter.Iter

        System.out.println("CHECKPOINT "+checkpoint);
        if (checkpoint == -2452059308835280636l) {
          System.out.println();
        }
       
        Iter iter = api.query("test", query, Util.literalSMap());
        List<Object> results = yank(iter);
       
        System.out.println("expctd "+JSONValue.toJSONString(matching));
        System.out.println("vs     "+results);
       
View Full Code Here

Examples of org.elasticsearch.index.fielddata.BytesValues.Iter

            if(_entries.size() > _maxPerShard)
                return;
            if(!_exhaustive && _random.nextFloat() > _sampleRate)
                return;

            final Iter iter = _values.getIter(docId);
            while(iter.hasNext() && _entries.size() < _maxPerShard) {
                _entries.add(iter.next(), iter.hash());
            }
        }
View Full Code Here

Examples of webit.script.lang.Iter

    public final boolean hasNext() {
        if (this.gotNext) {
            return true;
        }
        Iter it;
        while ((it = this.iter).hasNext()) {
            Object item;
            if (valid(item = it.next())) {
                this.gotNext = true;
                this.nextItem = item;
                return true;
            }
        }
View Full Code Here

Examples of webit.script.lang.Iter

        this.iterIndex = iterIndex;
        this.itemIndex = itemIndex;
    }

    public Object execute(final Context context) {
        Iter iter = CollectionUtil.toIter(collectionExpr.execute(context), this);
        if (iter != null && functionDeclareExpr != null) {
            iter = new IterMethodFilter(context, functionDeclareExpr.execute(context), iter);
        }
        if (iter != null
                && iter.hasNext()) {
        final int preIndex = context.indexer;
        context.indexer = indexer;
            final Statement[] stats = this.statements;
            final int i = this.itemIndex;
            final Object[] vars = context.vars;
            vars[iterIndex] = iter;
            do {
                vars[i] = iter.next();
                StatementUtil.executeInverted(stats, context);
            } while (iter.hasNext());
            context.indexer = preIndex;
            return null;
        } else if (elseStatement != null) {
            elseStatement.execute(context);
        }
View Full Code Here

Examples of webit.script.lang.Iter

        this.iterIndex = iterIndex;
        this.itemIndex = itemIndex;
    }

    public Object execute(final Context context) {
        Iter iter = CollectionUtil.toIter(collectionExpr.execute(context), this);
        if (iter != null && functionDeclareExpr != null) {
            iter = new IterMethodFilter(context, functionDeclareExpr.execute(context), iter);
        }
        if (iter != null
                && iter.hasNext()) {
            final int preIndex = context.indexer;
            context.indexer = indexer;
            final Statement[] stats = this.statements;
            final int myLabel = this.label;
            final int index = this.itemIndex;
            final Object[] vars = context.vars;
            vars[iterIndex] = iter;
            label:
            do {
                vars[index] = iter.next();
                StatementUtil.executeInvertedAndCheckLoops(stats, context);
                if (context.hasLoop()) {
                    if (context.matchLabel(myLabel)) {
                        switch (context.getLoopType()) {
                            case LoopInfo.BREAK:
                                context.resetLoop();
                                break label; // while
                            case LoopInfo.RETURN:
                                //can't deal
                                break label; //while
                            case LoopInfo.CONTINUE:
                                context.resetLoop();
                                break; //switch
                            default:
                                break label; //while
                            }
                    } else {
                        break;
                    }
                }
            } while (iter.hasNext());
            context.indexer = preIndex;
            return null;
        } else if (elseStatement != null) {
            elseStatement.execute(context);
        }
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.