// matchProperty implements PhysicalPlan matchProperty interface.
338137
func (p *Selection) matchProperty(prop *requiredProperty, childPlanInfo ...*physicalPlanInfo) *physicalPlanInfo {
	if p.onTable {
		res := p.GetChildByIndex(0).(PhysicalPlan).matchProperty(prop, childPlanInfo...)
		sel := *p
		sel.SetChildren(res.p)
		res.p = &sel
		res.count = uint64(float64(res.count) * selectionFactor)
		return res
	}
	np := *p
	np.SetChildren(childPlanInfo[0].p)
	count := uint64(float64(childPlanInfo[0].count) * selectionFactor)
	return &physicalPlanInfo{p: &np, cost: childPlanInfo[0].cost, count: count}
}
1122267
func (p *Post) GetProperty(key string) (interface{}, error) {
	if field, exists := reflect.TypeOf(p).Elem().FieldByName(key); exists {
		return reflect.ValueOf(p).Elem().FieldByIndex(field.Index), nil
	}
	return nil, errors.New(fmt.Sprintf("Property %s does not exist", key))
}
726807
func (r *Matcher) Matches() bool {
	return r.scope() &&
		r.operation() &&
		r.group() &&
		r.version() &&
		r.resource()
}
1111672
func (c *ConstraintMap) Match(params map[string]string) bool {
	// when no includes or excludes automatically match
	if len(c.Include) == 0 && len(c.Exclude) == 0 {
		return true
	}

	// exclusions are processed first. So we can include everything and then
	// selectively include others.
	if len(c.Exclude) != 0 {
		var matches int

		for key, val := range c.Exclude {
			if params[key] == val {
				matches++
			}
		}
		if matches == len(c.Exclude) {
			return false
		}
	}

	for key, val := range c.Include {
		if params[key] != val {
			return false
		}
	}

	return true
}
577430
func MatchIPProto(ipp uint8) ofp.XM {
	return basic(ofp.XMTypeIPProto, bytesOf(ipp), nil)
}
1057930
func (p PathMatcher) Match(r *http.Request) bool {
	return Path(r.URL.Path).Matches(string(p))
}
557022
func podMatchesAllAffinityTermProperties(pod *v1.Pod, properties []*affinityTermProperties) bool {
	if len(properties) == 0 {
		return false
	}
	for _, property := range properties {
		if !priorityutil.PodMatchesTermsNamespaceAndSelector(pod, property.namespaces, property.selector) {
			return false
		}
	}
	return true
}
715964
func (t *docMatchTree) matches(cp *contentProvider, cost int, known map[matchTree]bool) (bool, bool) {
	return len(t.current) > 0, true
}
99345
func (c *Criterion) MatchFunc(match MatchFunc) *Query {
	if c.query.currentField == Key {
		panic("Match func cannot be used against Keys, as the Key type is unknown at runtime, and there is no value compare against")
	}

	return c.op(fn, match)
}
660751
func (bp BodiesProperty) GetProperty(name string) Property {
	p, ok := bp.Properties[name]
	if !ok {
		panic(fmt.Errorf("can't find property name %v", name))
	}
	return toProperty(name, p)
}
1095067
func MatchesMap(buf []byte, matchers matchers.Map) bool {
	return MatchMap(buf, matchers) != types.Unknown
}
1064269
func (fc *FeatureCollection) FillProperties() {
	properties := make(map[string]bool)

	// Loop 1: construct a set (actually a map)
	for _, feature := range fc.Features {
		for key := range feature.Properties {
			if _, ok := properties[key]; !ok {
				properties[key] = true
			}
		}
	}

	// Loop 2: make sure each feature has each property from the set
	for _, feature := range fc.Features {
		for key := range properties {
			if _, ok := feature.Properties[key]; !ok {
				feature.Properties[key] = nil
			}
		}
	}
}
691606
func (r Resource) Match(resource string, conditionValues map[string][]string) bool {
	pattern := r.Pattern
	for _, key := range condition.CommonKeys {
		// Empty values are not supported for policy variables.
		if rvalues, ok := conditionValues[key.Name()]; ok && rvalues[0] != "" {
			pattern = strings.Replace(pattern, key.VarName(), rvalues[0], -1)
		}
	}
	if strings.HasPrefix(resource, pattern) {
		return true
	}
	return wildcard.Match(pattern, resource)
}
1240685
func (s *OperEndpointState) Matches(c *mastercfg.CfgEndpointState) bool {
	return s.NetID == c.NetID &&
		s.EndpointID == c.EndpointID &&
		s.IPAddress == c.IPAddress &&
		s.IPv6Address == c.IPv6Address &&
		s.MacAddress == c.MacAddress &&
		s.HomingHost == c.HomingHost &&
		s.IntfName == c.IntfName &&
		s.VtepIP == c.VtepIP
}
643712
func Match(payload FullPayloadInfo, pattern string) bool {
	pattern = strings.ToLower(pattern)

	switch {
	case strings.ToLower(payload.Name) == pattern:
		return true
	case strings.ToLower(payload.Type) == pattern:
		return true
	case strings.ToLower(payload.ID) == pattern:
		return true
	case strings.ToLower(payload.Status) == pattern:
		return true
	case strings.ToLower(payload.Unit) == pattern:
		return true
	case strings.ToLower(payload.Machine) == pattern:
		return true
	default:
		for _, tag := range payload.Labels {
			if strings.ToLower(tag) == pattern {
				return true
			}
		}
	}
	return false
}
763866
func (actionSet ActionSet) Match(action Action) bool {
	for r := range actionSet {
		if r.Match(action) {
			return true
		}
	}

	return false
}
779281
func (p *Union) matchProperty(_ *requiredProperty, childPlanInfo ...*physicalPlanInfo) *physicalPlanInfo {
	np := *p
	children := make([]Plan, 0, len(childPlanInfo))
	cost := float64(0)
	count := uint64(0)
	for _, res := range childPlanInfo {
		children = append(children, res.p)
		cost += res.cost
		count += res.count
	}
	np.SetChildren(children...)
	return &physicalPlanInfo{p: &np, cost: cost, count: count}
}