// ContainsInterval returns true iff the interval contains oi.
493167
func (i Interval) ContainsInterval(oi Interval) bool {
	if i.IsInverted() {
		if oi.IsInverted() {
			return oi.Lo >= i.Lo && oi.Hi <= i.Hi
		}
		return (oi.Lo >= i.Lo || oi.Hi <= i.Hi) && !i.IsEmpty()
	}
	if oi.IsInverted() {
		return i.IsFull() || oi.IsEmpty()
	}
	return oi.Lo >= i.Lo && oi.Hi <= i.Hi
}
347405
func (a *TimestampArray) Contains(min, max int64) bool {
	rmin, rmax := a.FindRange(min, max)
	if rmin == -1 && rmax == -1 {
		return false
	}

	// a.Timestamps[rmin] ≥ min
	// a.Timestamps[rmax] ≥ max

	if a.Timestamps[rmin] == min {
		return true
	}

	if rmax < a.Len() && a.Timestamps[rmax] == max {
		return true
	}

	return rmax-rmin > 0
}
1155382
func (i Interval) Equal(oi Interval) bool {
	return i == oi || i.IsEmpty() && oi.IsEmpty()
}
795699
func (f *Request) InitialInterval(t time.Duration) *Request {
	f.backoff.InitialInterval = t
	return f
}
28614
func (set Mysql56GTIDSet) Contains(other GTIDSet) bool {
	other56, ok := other.(Mysql56GTIDSet)
	if !ok {
		return false
	}

	// Check each SID in the other set.
	for sid, otherIntervals := range other56 {
		i := 0
		intervals := set[sid]
		count := len(intervals)

		// Check each interval for this SID in the other set.
		for _, iv := range otherIntervals {
			// Check that interval against each of our intervals.
			// Intervals are monotonically increasing,
			// so we don't need to reset the index each time.
			for {
				if i >= count {
					// We ran out of intervals to check against.
					return false
				}
				if intervals[i].contains(iv) {
					// Yes it's covered. Go on to the next one.
					break
				}
				i++
			}
		}
	}

	// No uncovered intervals were found.
	return true
}
698577
func (i Interval) Union(oi Interval) Interval {
	if oi.IsEmpty() {
		return i
	}
	if i.fastContains(oi.Lo) {
		if i.fastContains(oi.Hi) {
			// Either oi ⊂ i, or i ∪ oi is the full interval.
			if i.ContainsInterval(oi) {
				return i
			}
			return FullInterval()
		}
		return Interval{i.Lo, oi.Hi}
	}
	if i.fastContains(oi.Hi) {
		return Interval{oi.Lo, i.Hi}
	}

	// Neither endpoint of oi is in i. Either i ⊂ oi, or i and oi are disjoint.
	if i.IsEmpty() || oi.fastContains(i.Lo) {
		return oi
	}

	// This is the only hard case where we need to find the closest pair of endpoints.
	if positiveDistance(oi.Hi, i.Lo) < positiveDistance(i.Hi, oi.Lo) {
		return Interval{oi.Lo, i.Hi}
	}
	return Interval{i.Lo, oi.Hi}
}
1061709
func (s *Thumbnails) SetInterval(v string) *Thumbnails {
	s.Interval = &v
	return s
}
25613
func (rc *ReadinessCheck) SetInterval(interval time.Duration) *ReadinessCheck {
	secs := int(interval.Seconds())
	rc.IntervalSeconds = secs
	return rc
}
472730
func (r *Range) Contains(value int) bool {
	if r.from == nil && r.to == nil {
		return false
	}
	if r.from != nil && value < *r.from {
		return false
	}
	if r.to != nil && value > *r.to {
		return false
	}
	return true
}
693068
func (rb *Bitmap) ContainsInt(x int) bool {
	return rb.Contains(uint32(x))
}
1331236
public boolean containsInterval(Interval<T> i) {

        for (Interval<T> item : intervals) {
            if (item.contains(i)) {
                return true;
            }
        }

        return false;
    }
112556
func ToInterval(ls orb.LineString, df orb.DistanceFunc, dist float64) orb.LineString {
	if dist <= 0 {
		return nil
	}

	// precomputes the total distance and intermediate distances
	total, dists := precomputeDistances(ls, df)

	totalPoints := int(total/dist) + 1
	ls, ret := resampleEdgeCases(ls, totalPoints)
	if ret {
		return ls
	}

	return resample(ls, dists, total, totalPoints)
}
474431
func (a *CompositeAggregationHistogramValuesSource) Interval(interval float64) *CompositeAggregationHistogramValuesSource {
	a.interval = interval
	return a
}
1017084
func (s *CreateRule) SetIntervalUnit(v string) *CreateRule {
	s.IntervalUnit = &v
	return s
}
166378
func WithMaxInterval(maxInterval time.Duration) Option {
	return func(c *Checkpoint) {
		c.maxInterval = maxInterval
	}
}
942883
func (s Seq) Contains(q uint32) bool {
	if q == 0 {
		return s.Stop == 0 // "*" is contained only in "*" and "n:*"
	}
	return s.Start != 0 && s.Start <= q && (q <= s.Stop || s.Stop == 0)
}
1354580
func (s *DvbSdtSettings) SetSdtInterval(v int64) *DvbSdtSettings {
	s.SdtInterval = &v
	return s
}