// Filter creates and return a filter query builder
510914
func (b *BoolQueryBuilder) Filter() *FilterQueryBuilder {
	if b.filterQueryBuilder == nil {
		b.filterQueryBuilder = NewFilterQueryBuilder()
	}
	return b.filterQueryBuilder
}
704967
func (k *KeyBindings) Filter(kp KeyPress) (ret KeyBindings) {
	p := Prof.Enter("key.filter")
	defer p.Exit()

	kp.fix()
	k.DropLessEqualKeys(k.seqIndex)
	ret.seqIndex = k.seqIndex + 1
	ki := kp.Index()

	k.filter(ki, &ret)

	if kp.IsCharacter() {
		k.filter(int(Any), &ret)
	}
	return
}
705934
func (list ErrorList) Filter(fns ...utilerrors.Matcher) ErrorList {
	err := utilerrors.FilterOut(list.ToAggregate(), fns...)
	if err == nil {
		return nil
	}
	// FilterOut takes an Aggregate and returns an Aggregate
	return fromAggregate(err.(utilerrors.Aggregate))
}
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)
	})
}
277840
func (mr *MockFilterDeleterMockRecorder) Filter(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
	varargs := append([]interface{}{arg0}, arg1...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockFilterDeleter)(nil).Filter), varargs...)
}
1174054
func (s *Set) Filter(cb func(interface{}) bool) *Set {
	result := new(Set)

	for _, v := range s.m {
		if cb(v) {
			result.Add(v)
		}
	}

	return result
}
1300660
func (offers Index) Filter(filter Filter) (result Index) {
	if sz := len(result); sz > 0 {
		result = make(Index, sz)
		for id, offer := range offers {
			if filter.Accept(offer) {
				result[id] = offer
			}
		}
	}
	return
}
1190063
func (q *FunctionScoreQuery) Filter(filter Query) *FunctionScoreQuery {
	q.filter = filter
	return q
}
1362808
func (s Selector) Filter(nodes []*html.Node) (result []*html.Node) {
	for _, n := range nodes {
		if s(n) {
			result = append(result, n)
		}
	}
	return result
}
827199
func (srv *StreamService) Filter(params *StreamFilterParams) (*Stream, error) {
	req, err := srv.public.New().Post("filter.json").QueryStruct(params).Request()
	if err != nil {
		return nil, err
	}
	return newStream(srv.client, req), nil
}
1259332
func (rs *Results) Filter(fn func(Result) bool) *Results {
	results := make(Results, 0)
	for _, result := range *rs {
		if fn(result) {
			results = append(results, result)
		}
	}
	return &results
}
304230
func (p *aeBackupInformationQueryProperty) Filter(op string, value interface{}) *aeBackupInformationQueryBuilder {
	switch op {
	case "<=":
		p.LessThanOrEqual(value)
	case ">=":
		p.GreaterThanOrEqual(value)
	case "<":
		p.LessThan(value)
	case ">":
		p.GreaterThan(value)
	case "=":
		p.Equal(value)
	default:
		p.bldr.q = p.bldr.q.Filter(p.name+" "+op, value) // error raised by native query
	}
	if p.bldr.plugin != nil {
		p.bldr.plugin.Filter(p.name, op, value)
	}
	return p.bldr
}
930604
func (p *UserQueryProperty) Filter(op string, value interface{}) *UserQueryBuilder {
	switch op {
	case "<=":
		p.LessThanOrEqual(value)
	case ">=":
		p.GreaterThanOrEqual(value)
	case "<":
		p.LessThan(value)
	case ">":
		p.GreaterThan(value)
	case "=":
		p.Equal(value)
	default:
		p.bldr.q = p.bldr.q.Filter(p.name+" "+op, value) // error raised by native query
	}
	if p.bldr.plugin != nil {
		p.bldr.plugin.Filter(p.name, op, value)
	}
	return p.bldr
}
1100055
func (r *Response) Filter(fn FilterResponseFunc) *Response {
	r.Filters = append(r.Filters, fn)
	return r
}
343583
func (nodes CheckServiceNodes) Filter(onlyPassing bool) CheckServiceNodes {
	return nodes.FilterIgnore(onlyPassing, nil)
}
1166805
func (a Nodes) Filter(n *Node) []*Node {
	other := make([]*Node, 0, len(a))
	for i := range a {
		if a[i] != n {
			other = append(other, a[i])
		}
	}
	return other
}
768611
func (self *NameFilter) Filter(record *LogRecord) bool {
	length := len(self.name)
	if length == 0 {
		return true
	} else if self.name == record.Name {
		return true
	} else if !strings.HasPrefix(record.Name, self.name) {
		return false
	}
	return (record.Name[length] == '.')
}