Returns the index of a key in the set.

@param key The key to search for.
@return Returns the index of the key if it exists, else a negative integer.
429594
public int indexOfKey(Object key) {
        return key == null ? indexOfNull() : indexOf(key, key.hashCode());
    }
1023955
@CheckForSigned
  private int _getPutIndex (final int key)
  {
    final int readIdx = _getReadIndex (key);
    if (readIdx >= 0)
      return readIdx;
    // key not found, find insertion point
    final int startIdx = MapHelper.phiMix (key) & m_nMask;
    if (m_aKeys[startIdx] == FREE_KEY)
      return startIdx;
    int idx = startIdx;
    while (m_aKeys[idx] != FREE_KEY)
    {
      idx = _getNextIndex (idx);
      if (idx == startIdx)
        return -1;
    }
    return idx;
  }
1014138
public int getInt(String key) {
    	String value = get(key);
    	Utils.require(value != null, key + " parameter is not set");
    	try {
    		return Integer.parseInt(value);
        } catch (NumberFormatException e) {
            throw new IllegalArgumentException(key + " parameter should be a number");
        }
    }
501311
public int getRequiredInt(String key) {
        Optional<Integer> value = getInteger(key);
        if (value.isPresent()) {
            return value.get();
        }
        throw new IllegalStateException(String.format("required key [%s] not found", key));
    }
41302
int indexOf(ResourcePath key) {
    QueryDocumentSnapshot document = keyIndex.get(key);
    if (document == null) {
      return -1;
    }
    return sortedSet.indexOf(document);
  }
513907
function(key) {
			var idx;
			do {
				idx = this.contents.indexOf(key, idx);
			} while(idx !== -1 && !isEven(idx));
			return idx;
		}
371642
def get_index(self, key):
        
        try:
            return self[self.index_lookup.get(key)]

        except TypeError:
            raise KeyError
1009998
public final MtasSolrStatus get(String key) throws IOException {
    return index.get(Objects.requireNonNull(key, "no key provided"));
  }
1281208
@Override
    public Set<V> get(Object key)
    {
        Set<V> set = map.get(key);
        return set != null ? set : Collections.EMPTY_SET;
    }
562723
public StorableIndex<S> findKeyIndex(StorableKey<S> key) {
        if (key == null) {
            throw new IllegalArgumentException();
        }

        Set<? extends OrderedProperty<S>> orderedProps = key.getProperties();

        Set<StorableProperty<S>> keyProps = new HashSet<StorableProperty<S>>();
        for (OrderedProperty<S> orderedProp : orderedProps) {
            keyProps.add(orderedProp.getChainedProperty().getPrimeProperty());
        }

        search: for (StorableIndex<S> index : this) {
            if (!index.isUnique() || index.getPropertyCount() != keyProps.size()) {
                continue search;
            }
            for (int i=index.getPropertyCount(); --i>=0; ) {
                if (!keyProps.contains(index.getProperty(i))) {
                    continue search;
                }
            }
            return index;
        }

        return null;
    }
1060173
public synchronized int getKey(String k) {
        for (int i = nkeys; --i >= 0;)
            if ((keys[i] == k) ||
                (k != null && k.equalsIgnoreCase(keys[i])))
                return i;
        return -1;
    }
619102
public V get(K key, int index) {
		final Collection<V> collection = get(key);
		return CollUtil.get(collection, index);
	}
101531
public final int getIgnoreCase(String key)
  {

    if (null == key)
        return INVALID_KEY;

    for (int i = 0; i < m_firstFree; i++)
    {
      if (m_map[i].equalsIgnoreCase(key))
        return m_values[i];
    }

    return INVALID_KEY;
  }
565129
public ArrayList<String> get(String key) {
    Iterator<Pair<String, ArrayList<String>>> it = store.iterator();
    while (it.hasNext()) {
      Pair<String, ArrayList<String>> pair = it.next();
      if (key.equals(pair.first)) {
        return pair.second;
      }
    }
    return null;
  }
1363043
public long get(K key)
  {
    if (key == null)
      return _nullValue;

    int hash = key.hashCode() & _mask;

    while (true) {
      K mapKey = _keys[hash];

      if (mapKey == key)
        return _values[hash];
      else if (mapKey == null) {
        if ((_flags[hash] & DELETED) == 0)
          return NULL;
      }
      else if (mapKey.equals(key))
        return _values[hash];

      hash = (hash + 1) & _mask;
    }
  }
247888
@SuppressWarnings("unchecked")
    public V get(final int key)
    {
        V value = null;
        @DoNotSub final int setNumber = Hashing.hash(key, mask);
        @DoNotSub final int setBeginIndex = setNumber << setSizeShift;

        for (@DoNotSub int i = setBeginIndex, setEndIndex = setBeginIndex + setSize; i < setEndIndex; i++)
        {
            if (null == values[i])
            {
                break;
            }

            if (key == keys[i])
            {
                value = (V)values[i];
                break;
            }
        }

        if (null == value)
        {
            cacheMisses++;
        }
        else
        {
            cacheHits++;
        }

        return value;
    }
635248
public boolean containsKey(Object key) {
	int k = checkKey(key);
	int index = Arrays.binarySearch(keyIndices, k);
	return index >= 0;
    }