Examples of asIterable()


Examples of com.google.appengine.api.datastore.PreparedQuery.asIterable()

            AbstractClassMetaData relCmd = nucCtx.getMetaDataManager().getMetaDataForClass(mmd.getTypeName(), clr);
            String relKindName = EntityUtils.getKindName(storeMgr.getIdentifierFactory(), relCmd);
            Query q2 = new Query(relKindName, entity.getKey());
            PreparedQuery pq2 = datastore.prepare(q2);
            Object value = null;
            for (Entity childEntity : pq2.asIterable()) { // Should be only one (see FetchFieldManager)
              if (entity.getKey().equals(childEntity.getKey().getParent())) {
                value = childEntity.getKey();
                break;
              }
            }
View Full Code Here

Examples of org.kiji.schema.KijiRowData.asIterable()

    final KijiDataRequest dataRequest = KijiDataRequest.builder()
        .addColumns(ColumnsDef.create().withMaxVersions(3).addFamily("map"))
        .build();

    final KijiRowData row1 = mReader.get(mEntityId, dataRequest);
    final List<KijiCell<Integer>> cells = Lists.newArrayList(row1.<Integer>asIterable(MAP));
    final int cellCount = cells.size();
    assertEquals("Wrong number of cells returned by asIterable.", 3, cellCount);
  }
}
View Full Code Here

Examples of org.python.core.BaseSet.asIterable()

                    write_byte(TYPE_FROZENSET);
                }
                int n = v.__len__();
                write_int(n);
                BaseSet set = (BaseSet) v;
                for (PyObject item : set.asIterable()) {
                    write_object(item, depth + 1);
                }
            } else if (v instanceof PyBytecode) {
                PyBytecode code = (PyBytecode) v;
                write_byte(TYPE_CODE);
View Full Code Here

Examples of org.python.core.PyList.asIterable()

        if (!instantiate) {
            PyList ret = cls.keys();
            PyList dictKeys = dict.keys();

            for (PyObject name : dictKeys.asIterable()) {
                if (!cls.has_key(name)) {
                    if (exclpkgs && dict.get(name) instanceof PyJavaPackage)
                        continue;
                    ret.append(name);
                }
View Full Code Here

Examples of org.python.core.PyObject.asIterable()

    public String[] getEnv() {
        PyObject items = imp.load("os").__getattr__("environ").invoke("items");
        String[] env = new String[items.__len__()];
        int i = 0;
        for (PyObject item : items.asIterable()) {
            env[i++] = String.format("%s=%s", item.__getitem__(0), item.__getitem__(1));
        }
        return env;
    }
View Full Code Here

Examples of org.python.core.PyTuple.asIterable()

        private String[] read_strings(int depth) {
            PyTuple t = (PyTuple) read_object_notnull(depth);
            String some_strings[] = new String[t.__len__()];
            int i = 0;
            for (PyObject item : t.asIterable()) {
                some_strings[i++] = item.toString().intern();
            }
            return some_strings;
        }
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.