// And sets AND condition
352199
func (b *Builder) And(cond Cond) *Builder {
	b.cond = And(b.cond, cond)
	return b
}
301398
func (notNull NotNull) And(conds ...Cond) Cond {
	return And(notNull, And(conds...))
}
605397
func (s *EmptyTransformer) AcceptAnd(v And) {
	s.Result = And{
		Left:  s.Transform(v.Left),
		Right: s.Transform(v.Right),
	}
}
432886
func (m IfMatcher) And(r *http.Request) bool {
	for _, i := range m.ifs {
		if !i.True(r) {
			return false
		}
	}
	return true
}
634016
func (s *SeriesIDSet) And(other *SeriesIDSet) *SeriesIDSet {
	s.RLock()
	defer s.RUnlock()
	other.RLock()
	defer other.RUnlock()
	return &SeriesIDSet{bitmap: roaring.And(s.bitmap, other.bitmap)}
}
185643
func (q *Query) and(r *Query) *Query {
	return q.andOr(r, QAnd)
}
61953
func (le Le) And(conds ...Cond) Cond {
	return And(le, And(conds...))
}
1050518
func and(groups []Group) []Group {
	op := &andOperation{stack: &stack{}}
	op.and(groups, 0)
	return op.result
}
662681
func (set *Set) All(items ...interface{}) bool {
	set.lock.RLock()
	defer set.lock.RUnlock()

	for _, item := range items {
		if _, ok := set.items[item]; !ok {
			return false
		}
	}

	return true
}
1119093
func Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) bool {
	result := comp()
	if !result {
		Fail(t, "Condition failed!", msgAndArgs...)
	}
	return result
}
405607
func (s *SelectQuery) AndHaving(e Expression) *SelectQuery {
	s.having = And(s.having, e)
	return s
}
146924
func (qb *MySQLQueryBuilder) And(cond string) QueryBuilder {
	qb.Tokens = append(qb.Tokens, "AND", cond)
	return qb
}
610271
func (s *set) Each(f func(item interface{}) bool) {
	for item := range s.m {
		if !f(item) {
			break
		}
	}
}
590272
func (neq Neq) And(conds ...Cond) Cond {
	return And(neq, And(conds...))
}
1024400
func (c Condition) Or(condition ...Condition) Condition {
	if c.None() && len(condition) == 1 {
		return condition[0]
	} else if c.Type == ConditionOr || c.None() {
		c.Type = ConditionOr
		c.Inner = append(c.Inner, condition...)
		return c
	}

	inner := append([]Condition{c}, condition...)
	return Or(inner...)
}
1346741
func (q *ConjunctionQuery) And(queries ...FtsQuery) *ConjunctionQuery {
	q.options["conjuncts"] = append(q.options["conjuncts"].([]FtsQuery), queries...)
	return q
}
1233165
func (s1 VertexSet) And(s2 VertexSet) VertexSet {
	switch {
	case s1.set == nil:
		return s2
	case s2.set == nil:
		return s1
	}

	type point struct {
		x int
		a bool // Tells if x is a of [a, b).
	}
	points := make([]point, 0, 2*(len(s1.set)+len(s2.set)))
	for _, in := range s1.set {
		points = append(points, point{in.a, true})
		points = append(points, point{in.b, false})
	}
	for _, in := range s2.set {
		points = append(points, point{in.a, true})
		points = append(points, point{in.b, false})
	}
	sort.Slice(points, func(i, j int) bool {
		if points[i].x == points[j].x {
			return !points[i].a
		}
		return points[i].x < points[j].x
	})

	s := empty()
	start, count := 0, 0
	for _, p := range points {
		switch count {
		case 0:
			count++
		case 1:
			if p.a {
				start = p.x
				count++
			} else {
				count--
			}
		case 2:
			s.set = append(s.set, interval{start, p.x, 0})
			count--
		}
	}
	s.update()
	return s
}