// Less returns whether this key comes before another.
772256
func (k1 Key) Less(k2 Key) bool {
	if k1.Space != k2.Space {
		panic("k1 and k2 not in same key space.")
	}
	return k1.Space.Less(k1, k2)
}
985167
func (cs ChunkSorter) Less(i, j int) bool {
	return cs[i].Header.NumFirstRecLog < cs[j].Header.NumFirstRecLog
}
1062302
func (s *containerSorter) Less(i, j int) bool {
	return s.by(s.containers[i], s.containers[j])
}
510313
func (gtcsl TabletCacheStatusList) Less(i, j int) bool {
	iKey := strings.Join([]string{gtcsl[i].Keyspace, gtcsl[i].Shard, string(gtcsl[i].TabletType), gtcsl[i].Name}, ".")
	jKey := strings.Join([]string{gtcsl[j].Keyspace, gtcsl[j].Shard, string(gtcsl[j].TabletType), gtcsl[j].Name}, ".")
	return iKey < jKey
}
88533
func (pq *BlockPriorityQueue) Less(i, j int) bool {
	return pq.lessFn(pq.bh[i], pq.bh[j])
}
292406
func less(a, b uint32) bool {
	if a < b {
		return (b - a) <= MaxSerialIncrement
	}
	return (a - b) > MaxSerialIncrement
}
534636
func (i *Info) Less(right *Info) bool {
	if i.Major != right.Major {
		return i.Major < right.Major
	}
	if i.Minor != right.Minor {
		return i.Minor < right.Minor
	}
	if i.Patch != right.Patch {
		return i.Patch < right.Patch
	}

	// Pre-release versions have a lower precedence than the associated normal version.
	if i.Rest == "" && right.Rest != "" {
		return true
	}
	if i.Rest != "" && right.Rest == "" {
		return false
	}

	// For now, we ignore proper parsing and comparision of pre-release versions.
	return false
}
73607
func (s UintSlice) Less(i, j int) bool {
	return s[i] < s[j]
}
172477
func (s Int16Slice) Less(i, j int) bool {
	return s[i] < s[j]
}
1002476
func (s Float32Slice) Less(i, j int) bool {
	return s[i] < s[j]
}
1148100
func (pt PrimitiveTypes) Less(i, j int) bool {
	return pt[i] < pt[j]
}
800719
func (fs *FileSorter) Less(i, j int) bool {
	l := fs.buf[i].key
	r := fs.buf[j].key
	ret, err := lessThan(fs.sc, l, r, fs.byDesc)
	if fs.err == nil {
		fs.err = err
	}
	return ret
}
1043525
func (ms *multiAddrSorter) Less(i, j int) bool {
	p, q := &ms.addrs[i], &ms.addrs[j]
	// Try all but the last comparison.
	var k int
	for k = 0; k < len(ms.cmp)-1; k++ {
		cmp := ms.cmp[k]
		x := cmp(p, q)
		switch x {
		case -1:
			// p < q, so we have a decision.
			return true
		case 1:
			// p > q, so we have a decision.
			return false
		}
		// p == q; try the next comparison.
	}
	// All comparisons to here said "equal", so just return whatever the
	// final comparison reports.
	switch ms.cmp[k](p, q) {
	case -1:
		return true
	case 1:
		return false
	default:
		// Still a tie! Now what?
		return false
	}
}
574132
func (history *History) Less(i, j int) bool {
	sandboxes := *history
	// FIXME: state access should be serialized
	return sandboxes[j].createdAt.Before(sandboxes[i].createdAt)
}
677325
func (a VarRefs) Less(i, j int) bool {
	if a[i].Val != a[j].Val {
		return a[i].Val < a[j].Val
	}
	return a[i].Type < a[j].Type
}
90378
func (ms *multiSorter) Less(i, j int) bool {
	p1, p2 := ms.pods[i], ms.pods[j]
	var k int
	for k = 0; k < len(ms.cmp)-1; k++ {
		cmpResult := ms.cmp[k](p1, p2)
		// p1 is less than p2
		if cmpResult < 0 {
			return true
		}
		// p1 is greater than p2
		if cmpResult > 0 {
			return false
		}
		// we don't know yet
	}
	// the last cmp func is the final decider
	return ms.cmp[k](p1, p2) < 0
}
871956
func (u uintSlice) Less(i, j int64) bool {
	return u[i] < u[j]
}