Returns an item from the index.
@param {String} indexName Name of the index to query. Cannot be null.
@param {String} key Unique key of the required item. Cannot be null.
192248
function (indexName, key) {
    return new Promise((resolve, reject) => {
      if (index[indexName]) {
        resolve(index[indexName][key] || null);
      } else {
        debug("opening index %s", indexName);
        storage.openIndex(indexName).then(index => {
          index[indexName] = index;
          resolve(index[indexName][key] || null);
        });
      }
    });
  }
282005
public Object get(Object key)
    {
        if (key==null)
            return _nullValue;
        if (key instanceof String)
            return get((String)key);
        return get(key.toString());
    }
1280619
@Override
  public List<String> indexKeys(String indexName, String indexKey) {
    lock.lock();
    try {
      if (!this.indexers.containsKey(indexName)) {
        throw new IllegalArgumentException(String.format("index %s doesn't exist!", indexName));
      }
      Map<String, Set<String>> index = this.indices.get(indexName);
      Set<String> set = index.get(indexKey);
      List<String> keys = new ArrayList<>(set.size());
      for (String key : set) {
        keys.add(key);
      }
      return keys;
    } finally {
      lock.unlock();
    }
  }
619102
public V get(K key, int index) {
		final Collection<V> collection = get(key);
		return CollUtil.get(collection, index);
	}
729126
public String get(String key) {
        Objects.requireNonNull(key, Required.KEY.toString());

        return this.values.get(key);
    }
689481
public int getIndex(Object key) {
    Integer i = (Integer) nset.get(key);
    if (i == null) {
      return -1;
    }
    else {
      return i.intValue();
    }
  }
929190
function (query, indexName) {
        if (!query) return;
        var index = this._indexes[indexName || this.mainIndex];
        return index[query] || index[query[this.mainIndex]] || this._indexes.cid[query] || this._indexes.cid[query.cid];
    }
106595
def item(self, key):
    
    return _item.Item(self._name, key, context=self._context)
1316689
private int indexOf(int key) {
		int startIndex = hashIndex(key);
		int index = startIndex;

		for (;;) {
			if (values[index] == null) {
				// It's available, so no chance that this value exists anywhere in the map.
				return -1;
			}
			if (key == keys[index]) {
				return index;
			}

			// Conflict, keep probing ...
			if ((index = probeNext(index)) == startIndex) {
				return -1;
			}
		}
	}
632590
int getIndexIndex(String indexName) {

        Index[] indexes = indexList;

        for (int i = 0; i < indexes.length; i++) {
            if (indexName.equals(indexes[i].getName().name)) {
                return i;
            }
        }

        // no such index
        return -1;
    }
687779
public void index(String indexName, String indexType, String... json) {
        index(
                Arrays.stream(json)
                        .map(item -> new IndexRequest.IndexRequestBuilder(indexName, indexType, item).build())
                        .collect(toList())
        );
    }
172800
public Object get(String key)
    {
        if (key==null)
            return _nullValue;
        
        Map.Entry entry = getEntry(key,0,key.length());
        if (entry==null)
            return null;
        return entry.getValue();
    }
722930
@Override
  public List<ApiType> byIndex(String indexName, String indexKey) {
    lock.lock();
    try {
      if (!this.indexers.containsKey(indexName)) {
        throw new IllegalArgumentException(String.format("index %s doesn't exist!", indexName));
      }
      Map<String, Set<String>> index = this.indices.get(indexName);
      Set<String> set = index.get(indexKey);
      if (set == null) {
        return Arrays.asList();
      }
      List<ApiType> items = new ArrayList<>(set.size());
      for (String key : set) {
        items.add(this.items.get(key));
      }
      return items;
    } finally {
      lock.unlock();
    }
  }
1084564
private JsonValue getFromJsonArray(String key, int index){
        PiwikJsonArray a = (PiwikJsonArray)parameters.get(key);
        if (a == null){
            return null;
        }
        
        return a.get(index);
    }
927925
function(key) {
          var self = this;
          var cache = self._indexCache;
          // evaluate whether our key is cached and, if so, whether it is up to date
          if( !cache.hasOwnProperty(key) || self.$keyAt(cache[key]) !== key ) {
            // update the hashmap
            var pos = self.$list.findIndex(function(rec) { return self.$$getKey(rec) === key; });
            if( pos !== -1 ) {
              cache[key] = pos;
            }
          }
          return cache.hasOwnProperty(key)? cache[key] : -1;
        }
1207384
def get(self, key, index=None):
        
        records = self.get_multi([key], index=index)

        try:
            return records[0][1]  # return the value from the key/value tuple
        except IndexError:
            return None
1101846
public int getIndex(Object key) {
    int[] nums = (int[]) cset.get(key);
    if (nums == null) {
      return -1;
    }
    else {
      return nums[1];
    }
  }