// If applies a filter func to a resource reducer; rejected resources are not processed by the receiving reducer.
2708
func (rf Reducer) If(f func(*mesos.Resource) bool) Reducer {
	if f == nil {
		return rf
	}
	return func(acc, x *mesos.Resource) *mesos.Resource {
		if f(x) {
			return rf(acc, x)
		}
		return acc
	}
}
632545
func (g *genExpansion) Filter(c *generator.Context, t *types.Type) bool {
	return len(g.types) == 0 || t == g.types[0]
}
1079046
func (fn FilterFunc) Check(rls *rspb.Release) bool {
	if rls == nil {
		return false
	}
	return fn(rls)
}
835776
func (b *UpdateBuilder) If(w ...Cmp) *UpdateBuilder {
	b._if = append(b._if, w...)
	return b
}
461772
func FilterOnlyGoSource(callinfo CallInfo) (valid bool, stop bool) {
	filename := strings.ToLower(callinfo.FileName())
	return strings.HasSuffix(filename, ".go"), false
}
1110480
func (s *FieldSort) Filter(filter Query) *FieldSort {
	s.filter = filter
	return s
}
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))
}
1341403
func (g *genClientset) Filter(c *generator.Context, t *types.Type) bool {
	ret := !g.clientsetGenerated
	g.clientsetGenerated = true
	return ret
}
1035306
func If(cond bool, children ...ComponentOrHTML) MarkupOrChild {
	if cond {
		return List(children)
	}
	return nil
}
766638
func (offers Slice) Filter(filter Filter) (result Slice) {
	if sz := len(result); sz > 0 {
		result = make(Slice, 0, sz)
		for i := range offers {
			if filter.Accept(&offers[i]) {
				result = append(result, offers[i])
			}
		}
	}
	return
}
820668
func (t *Table) Filter(f func(Row) bool) {
	t.mu.Lock()
	defer t.mu.Unlock()
	var newData []Row
	for _, r := range t.Data {
		if !f(r) {
			newData = append(newData, r)
		}
	}
	t.Data = newData
}
322546
func (u Uint16) If(fn func(uint16)) {
	if u.Present() {
		fn(*u.value)
	}
}
492049
func If(condition string, valueIfTrue, valueIfFalse Stringable) IfFunc {
	return IfFunc{
		list:         false,
		Condition:    condition,
		ValueIfTrue:  *valueIfTrue.String(),
		ValueIfFalse: *valueIfFalse.String(),
	}
}
829657
func (s String) If(fn func(string)) {
	if s.Present() {
		fn(*s.value)
	}
}
1112336
func filter(f func(string) bool, list []string) []string {
	var out []string
	for _, x := range list {
		if f(x) {
			out = append(out, x)
		}
	}
	return out
}
52214
func (s *Selection) IsFunction(f func(int, *Selection) bool) bool {
	return s.FilterFunction(f).Length() > 0
}
908224
func (s Shrink) Filter(condition func(interface{}) bool) Shrink {
	if condition == nil {
		return s
	}
	return func() (interface{}, bool) {
		value, ok := s()
		for ok && !condition(value) {
			value, ok = s()
		}
		return value, ok
	}
}