Builds and returns the collection runner for provided collection.
487033
public function getCollectionRunner(Collection $collection, int $flags = 0): CollectionRunnerInterface
    {
        $collectionQuery = $collection->getQuery();

        if ($collectionQuery instanceof Query) {
            $queryRunner = $this->getQueryRunner($collectionQuery, $flags);

            return new DynamicCollectionRunner($queryRunner, $this->visibilityResolver);
        }

        return new ManualCollectionRunner($this->visibilityResolver);
    }
286806
function runner (params, files) {
  var list = array(files || globs())

  list.forEach(function (file) {
    apply(require(path.resolve(file)), [test].concat(params))
  })

  return list
}
201793
protected function runDockerSyncDownCollection()
    {
        $this->collectionBuilder()
            ->addTask($this->taskDockerSyncStop())
            ->completion($this->taskDockerSyncClean())
            ->run();
    }
277207
@Deprecated
    public Class<?> getClassFromCollection(final String collection) {
        final Set<MappedClass> mcs = mappedClassesByCollection.get(collection);
        if (mcs == null || mcs.isEmpty()) {
            throw new MappingException(format("The collection '%s' is not mapped to a java class.", collection));
        }
        if (mcs.size() > 1) {
            if (LOG.isInfoEnabled()) {
                LOG.info(format("Found more than one class mapped to collection '%s'%s", collection, mcs));
            }
        }
        return mcs.iterator().next().getClazz();
    }
479353
function Collection(options) {
  if (!(this instanceof Collection)) {
    return new Collection(options);
  }

  Base.call(this, {}, options);
  this.is('Collection');
  this.items = {};

  this.use(utils.option());
  this.use(utils.plugin());
  this.init(options || {});
}
894915
public static <T> Gather<T> from(Collection<T> collection) {
		return new Gather<T>(collection);
	}
914444
def collection(cls, cid):
        
        url = urljoin(config.API_URL, 'collections/%s' % cid)
        return Collection(cls.query(url=url))
1052999
public static <T, C extends Collection<? super T>> C toCollection(
        Iterator<T> iterator, C collection)
    {
        Objects.requireNonNull(iterator, "The iterator is null");
        Objects.requireNonNull(iterator, "The collection is null");
        while (iterator.hasNext())
        {
            collection.add(iterator.next());
        }
        return collection;
    }
943096
public static <IN, OUT> List<OUT> create(Collection<IN> collection, Creator<IN, OUT> creator) {
        if (collection == null) {
            return null;
        }

        ArrayList<OUT> list = new ArrayList<>(collection.size());

        for (IN value : collection) {
            OUT item = value == null ? null : creator.create(value);
            if (item != null) {
                list.add(item);
            }
        }

        return list;
    }
998732
public Collection<? extends Action> createFor(Run target) {
        if (target instanceof AbstractBuild)
            return createFor((AbstractBuild)target);
        else
            return Collections.emptyList();
    }
1053276
function createRunner(builderInstance) {
    
    var runnerInstance={
        name:builderInstance.name,
        builder:builderInstance,
        run: function (input,callback) {
            
            var context =
                createContext(null, (input==null) ? {} : input);
            
            exec(builderInstance.root, context, function(err,result){
                if (callback){
                    callback(err,result);
                }
            });
        },
    };
    
    return runnerInstance;
}
291138
def create(name, dry_run, verbose, query=None, parent=None):
    """"""
    if parent is not None:
        parent = Collection.query.filter_by(name=parent).one().id
    collection = Collection(name=name, dbquery=query, parent_id=parent)
    db.session.add(collection)
    if verbose:
        click.secho('New collection: {0}'.format(collection))
1240979
def _get_collection(self, collection_uri, request_headers=None):
        """"""

        # get the collection
        status, headers, thecollection = self._rest_get(collection_uri)

        if status != 200:
            msg = self._get_extended_error(thecollection)
            raise exception.IloError(msg)

        while status < 300:
            # verify expected type
            # Don't limit to version 0 here as we will rev to 1.0 at some
            # point hopefully with minimal changes
            ctype = self._get_type(thecollection)
            if (ctype not in ['Collection.0', 'Collection.1']):
                raise exception.IloError("collection not found")

            # if this collection has inline items, return those
            # NOTE:  Collections are very flexible in how the represent
            # members.  They can be inline in the collection as members
            # of the 'Items' array, or they may be href links in the
            # links/Members array.  The could actually be both. Typically,
            # iLO implements the inline (Items) for only when the collection
            # is read only.  We have to render it with the href links when an
            # array contains PATCHable items because its complex to PATCH
            # inline collection members.

            if 'Items' in thecollection:
                # iterate items
                for item in thecollection['Items']:
                    # if the item has a self uri pointer,
                    # supply that for convenience.
                    memberuri = None
                    if 'links' in item and 'self' in item['links']:
                        memberuri = item['links']['self']['href']
                    yield 200, None, item, memberuri

            # else walk the member links
            elif ('links' in thecollection and
                  'Member' in thecollection['links']):
                # iterate members
                for memberuri in thecollection['links']['Member']:
                    # for each member return the resource indicated by the
                    # member link
                    status, headers, member = self._rest_get(memberuri['href'])
                    yield status, headers, member, memberuri['href']

            # page forward if there are more pages in the collection
            if ('links' in thecollection and
                    'NextPage' in thecollection['links']):
                next_link_uri = (collection_uri + '?page=' + str(
                                 thecollection['links']['NextPage']['page']))
                status, headers, thecollection = self._rest_get(next_link_uri)

            # else we are finished iterating the collection
            else:
                break
480194
public static StmtRunner get()
    {
        if (StmtRunner.RUNNER == null) {
            StmtRunner.RUNNER = new StmtRunner();
            EQLRUNNERS.add(SQLRunner.class);
        }
        return StmtRunner.RUNNER;
    }
1016366
private static <E> Collection<E> toCollection(Iterable<E> iterable) {
		return (iterable instanceof Collection) ? (Collection<E>)iterable : Lists.newArrayList(iterable.iterator());
	}
416073
public static Collection<Object> getCollectionProperties(Collection<?> collection,String name)
   throws Exception
   {
	   if(collection == null)
				throw new IllegalArgumentException("collection, name");
	   
	   ArrayList<Object> list = new ArrayList<Object>(collection.size());
	   
	   for (Object bean : collection)
		{
		   list.add(getNestedProperty(bean, name));
		}
	   
	   return list;
   }
171196
@SuppressWarnings("unchecked")
    public <R> SimpleReactStream<R> from(final Collection<R> collection) {
        return from(collection.stream());
    }