// GetFilter returns the filter by id.
540356
func (whisper *Whisper) GetFilter(id string) *Filter {
	return whisper.filters.Get(id)
}
136317
func (r Result) Filter(fn func(*resource.Info) bool) Result {
	var result Result
	for _, i := range r {
		if fn(i) {
			result.Append(i)
		}
	}
	return result
}
1239137
func GetFilterHash(filter *gcs.Filter) (chainhash.Hash, error) {
	filterData, err := filter.NBytes()
	if err != nil {
		return chainhash.Hash{}, err
	}

	return chainhash.DoubleHashH(filterData), nil
}
635558
func (s *IndicesAnalyzeService) Filter(filter ...string) *IndicesAnalyzeService {
	s.request.Filter = filter
	return s
}
948229
func Filter(result []Expression, input []Expression, filter func(Expression) bool) []Expression {
	for _, e := range input {
		if filter(e) {
			result = append(result, e)
		}
	}
	return result
}
837840
func (fs *Filters) Get(id string) *Filter {
	fs.mutex.RLock()
	defer fs.mutex.RUnlock()
	return fs.watchers[id]
}
1191739
func (g *GenScheme) Filter(c *generator.Context, t *types.Type) bool {
	ret := !g.schemeGenerated
	g.schemeGenerated = true
	return ret
}
1114018
func (filterModulator *FilterModulator) ApplyFilter(msg *Message) (FilterResult, error) {
	return filterModulator.Filter.ApplyFilter(msg)
}
283862
func (b *RouteBuilder) Filter(filter FilterFunction) *RouteBuilder {
	b.filters = append(b.filters, filter)
	return b
}
1091630
func IdentityFilterByUserID(userID uuid.UUID) func(db *gorm.DB) *gorm.DB {
	return func(db *gorm.DB) *gorm.DB {
		return db.Where("user_id = ?", userID)
	}
}
1201077
func (pattern *Pattern) GetFilter() Filter {
	ret := Filter(C.cairo_pattern_get_filter(pattern.Ptr))
	if err := pattern.status(); err != nil {
		panic(err)
	}
	return ret
}
806054
func (c *Container) Filter(filter FilterFunction) {
	c.containerFilters = append(c.containerFilters, filter)
}
978299
func (sc *SimpleCollection) AccessFilter() Filter {
	return func(sd common.SignedData) bool {
		if err := sc.accessPolicy.Evaluate([]*common.SignedData{&sd}); err != nil {
			return false
		}
		return true
	}
}
552896
func (s *NestedSort) Filter(filter Query) *NestedSort {
	s.filter = filter
	return s
}
922596
func (client *Client) GetServices(filters ...Filter) ([]Service, Warnings, error) {
	opts := requestOptions{
		RequestName: internal.GetServicesRequest,
		Query:       ConvertFilterParameters(filters),
	}

	return client.makeServicesRequest(opts)
}
840761
func (q *TagQuery) filterIdsFromChan(idCh, resCh chan schema.MKey) {
	for id := range idCh {
		var def *idx.Archive
		var ok bool

		if def, ok = q.byId[id]; !ok {
			// should never happen because every ID in the tag index
			// must be present in the byId lookup table
			corruptIndex.Inc()
			log.Errorf("memory-idx: ID %q is in tag index but not in the byId lookup table", id)
			continue
		}

		// we always omit tag filters because Run() does not support filtering by tags
		if q.testByAllExpressions(id, def, false) {
			resCh <- id
		}
	}

	q.wg.Done()
}
589496
func Filter(src string, filter func(int, []byte) error) error {
	return Read(src, func(fd *os.File) (err error) {
		return io2.FilterRead(fd, filter)
	})
}