func (m *SortedDictionary[KT, VT]) Index(k KT) int {
	m.lock.RLock()
	defer m.lock.RUnlock()
	i, ok := m.search(k)
	if !ok {
		return -1
	}
	return i
}
// Index returns the index of the key in the dictionary.
Index returns the index of the key in the dictionary.
// Index returns the index of the key in the dictionary .
func (m *SortedDictionary[KT, VT]) Index(k KT) int {
	m.lock.RLock()
	defer m.lock.RUnlock()
	i, ok := m.search(k)
	if !ok {
		return -1
	}
	return i
}
func ( m * SortedDictionary [ KT , VT ] ) Index ( k KT ) int { m . lock . RLock ( ) defer m . lock . RUnlock ( ) i , ok := m . search ( k ) if ! ok { return - 1 } return i }
Index returns the index of the key in the dictionary.
Index returns the index of the key in the dictionary .