//NewCollection returns an empty Collection.  You should a supply a joiner here
//if you want to run a transform on insert or remove from thelist.  You can
//pass nil if you don't need any joiner at the point you create the
//collection.
492511
func NewList(joiner Joiner) *Collection {
	result := &Collection{
		coll: NewAttribute(VALUE_ONLY, nil, nil),
	}
	if joiner != nil {
		result.join = []Joiner{joiner}
	}
	return result
}
1206069
func (c *FakeMutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
	action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOptions)

	_, err := c.Fake.Invokes(action, &v1beta1.MutatingWebhookConfigurationList{})
	return err
}
688732
func (c *FakeInstanceGroups) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
	action := testing.NewDeleteCollectionAction(instancegroupsResource, c.ns, listOptions)

	_, err := c.Fake.Invokes(action, &v1alpha2.InstanceGroupList{})
	return err
}
1112635
func NewMockCollection(ctrl *gomock.Controller) *MockCollection {
	mock := &MockCollection{ctrl: ctrl}
	mock.recorder = &MockCollectionMockRecorder{mock}
	return mock
}
351085
func (c *FakeKeysets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
	action := testing.NewDeleteCollectionAction(keysetsResource, c.ns, listOptions)

	_, err := c.Fake.Invokes(action, &kops.KeysetList{})
	return err
}
106178
func NewCollector(out io.Writer) *Collector {
	ts := &Collector{
		indexes: make(map[string]int),
		out:     out,
	}
	go func() {
		tick := time.NewTicker(time.Second * 2)
		for ; ; <-tick.C {
			ts.write()
		}
	}()
	return ts
}
511958
func (c *FakeUsers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
	action := testing.NewRootDeleteCollectionAction(usersResource, listOptions)

	_, err := c.Fake.Invokes(action, &user.UserList{})
	return err
}
746583
func (g *graph) CreateVertexCollection(ctx context.Context, collection string) (Collection, error) {
	req, err := g.conn.NewRequest("POST", path.Join(g.relPath(), "vertex"))
	if err != nil {
		return nil, WithStack(err)
	}
	input := struct {
		Collection string `json:"collection,omitempty"`
	}{
		Collection: collection,
	}
	if _, err := req.SetBody(input); err != nil {
		return nil, WithStack(err)
	}
	resp, err := g.conn.Do(ctx, req)
	if err != nil {
		return nil, WithStack(err)
	}
	if err := resp.CheckStatus(201, 202); err != nil {
		return nil, WithStack(err)
	}
	ec, err := newVertexCollection(collection, g)
	if err != nil {
		return nil, WithStack(err)
	}
	return ec, nil
}
1346891
func NewErrorCollection(dup ...DuplicatationOptions) *ErrorCollection {
	ec := &ErrorCollection{}
	ec.Errors = []error{}
	ec.Formatter = DefaultErrorFormatter
	if len(dup) != 0 {
		ec.DuplicatationOptions = dup[0]
	}
	return ec
}
245113
func (s *Scope) Collection(collectionName string, opts *CollectionOptions) *Collection {
	return newCollection(s, collectionName, opts)
}
1126344
func (c *FakeClusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
	action := testing.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOptions)

	_, err := c.Fake.Invokes(action, &v1beta1.ClusterRoleBindingList{})
	return err
}
649558
func (s *MyMongo) Collection() pezdispenser.Persistence {
	sess := s.Session.Copy()
	return pezdispenser.NewMongoCollectionWrapper(sess.DB(s.mongoDBName).C(s.mongoCollName))
}
453183
func newEdgeCollection(name string, g *graph) (Collection, error) {
	if name == "" {
		return nil, WithStack(InvalidArgumentError{Message: "name is empty"})
	}
	if g == nil {
		return nil, WithStack(InvalidArgumentError{Message: "g is nil"})
	}
	return &edgeCollection{
		name: name,
		g:    g,
		conn: g.db.conn,
	}, nil
}
1254233
func (service *Service) CreateCollection(label string) (*Collection, error) {
  properties := make(map[string]dbus.Variant)
  properties["org.freedesktop.Secret.Collection.Label"] = dbus.MakeVariant(label)

  var path   dbus.ObjectPath
  var prompt dbus.ObjectPath

  err := service.dbus.Call("org.freedesktop.Secret.Service.CreateCollection", 0, properties, "").Store(&path, &prompt)
  if err != nil {
    return &Collection{}, err
  }

  if isPrompt(prompt) {
    prompt := NewPrompt(service.conn, prompt)

    result, err := prompt.Prompt()
    if err != nil {
      return &Collection{}, err
    }

    path = result.Value().(dbus.ObjectPath)
  }

  return NewCollection(service.conn, path), nil
}
913333
func (s *Store) CreateCollection(name string, compare gtreap.Compare) *Collection {
	s.assertNotReadOnly()

	s.collLock.Lock()
	defer s.collLock.Unlock()

	// Try to get the existing Collection again now that we hold the write lock.
	if _, ok := s.colls[name]; ok {
		panic(fmt.Errorf("collection %q already exists", name))
	}

	// Create a new read/write Collection.
	coll := &Collection{
		name:     name,
		rootLock: &sync.RWMutex{},
	}
	coll.setRoot(gtreap.NewTreap(compare))

	if s.colls == nil {
		s.colls = make(map[string]*Collection)
	}
	s.colls[name] = coll
	s.collNames = s.insertCollectionName(name)
	return coll
}
1050609
func (c *FakeRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
	action := testing.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOptions)

	_, err := c.Fake.Invokes(action, &authorization.RoleBindingList{})
	return err
}
456051
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
	action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)

	_, err := c.Fake.Invokes(action, &v2beta1.HorizontalPodAutoscalerList{})
	return err
}