Reposition the key/value buffers based on the passed key and operation.

@param key to search for
@param op  options for this operation
@return false if key not found
513777
public boolean get(final T key, final GetOp op) {
    if (SHOULD_CHECK) {
      requireNonNull(key);
      requireNonNull(op);
      checkNotClosed();
      txn.checkReady();
    }
    kv.keyIn(key);

    final int rc = LIB.mdb_cursor_get(ptrCursor, kv.pointerKey(), kv
                                      .pointerVal(), op.getCode());

    if (rc == MDB_NOTFOUND) {
      return false;
    }

    checkRc(rc);
    kv.keyOut();
    kv.valOut();
    return true;
  }
399920
protected void setSecretKeyAbove(Tuple<SecretKey,byte[]> key) {
        up_prot.up(new Event(Event.SET_SECRET_KEY, key));
    }
340527
public boolean isInParameter(String key) {
        boolean isIn = false;

        if (this.getDirection(processKey(key)) == Direction.INOUT || this.getDirection(processKey(key)) == Direction.IN) {
            isIn = true;
        }

        return isIn;
    }
1036367
public boolean setPublicKey (String key)
    {
        return key == null ? false : setPublicKey(SecureUtil.stringToRSAPublicKey(key));
    }
1005788
public final void insertOp(Operation op) {
    ArrayList<Operation> tmp = new ArrayList<Operation>(inputQueue.size() + 1);
    tmp.add(op);
    inputQueue.drainTo(tmp);
    inputQueue.addAll(tmp);
  }
1161568
public EntryPosition getPosition(Object key, byte[] serializedKey) throws IOException {
      int segment = (key.hashCode() & Integer.MAX_VALUE) % segments.length;
      lock.readLock().lock();
      try {
         return IndexNode.applyOnLeaf(segments[segment], serializedKey, segments[segment].rootReadLock(), IndexNode.ReadOperation.GET_POSITION);
      } finally {
         lock.readLock().unlock();
      }
   }
433485
@Override
    public boolean containsKey(Object key) {
        if (key == null) {
            throw new NullPointerException();
        }
        
        CachedValue<K, V> entry = map.get(key);
        if (entry == null) {
            return false;
        }
        if (isValueExpired(entry)) {
            if (map.remove(key, entry)) {
                onValueRemove(entry);
                return false;
            }
            return containsKey(key);
        }
        return true;
    }
1084557
public final void updateKey(String key) throws IOException {
    Objects.requireNonNull(key, "old key required");
    if (index.containsKey(key)) {
      MtasSolrStatus status = index.get(key);
      index.remove(key);
      if (!index.containsKey(status.key())) {
        index.put(status.key(), status);
      } else {
        throw new IOException("key already exists");
      }
    }
  }
865608
protected static final void setRSAKey(byte[][] key) {
        BigInteger[] k = new BigInteger[8];
        for (int i = 0; i < 8; i++) {
            if (key[i] != null) {
                k[i] = new BigInteger(1, key[i]);
            }
        }

        if (k[3].compareTo(k[4]) < 0) {
            BigInteger tmp;
            tmp = k[3];
            k[3] = k[4];
            k[4] = tmp;
            tmp = k[5];
            k[5] = k[6];
            k[6] = tmp;
            k[7] = null;
        }
        if (k[7] == null) {
            k[7] = k[4].modInverse(k[3]);
        }
        if (k[0] == null) {
            k[0] = k[3].multiply(k[4]);
        }
        if (k[1] == null) {
            k[1] = k[2].modInverse(k[3].subtract(BigInteger.valueOf(1)).multiply(k[4].subtract(BigInteger.valueOf(1))));
        }
        if (k[5] == null) {
            k[5] = k[1].remainder(k[3].subtract(BigInteger.valueOf(1)));
        }
        if (k[6] == null) {
            k[6] = k[1].remainder(k[4].subtract(BigInteger.valueOf(1)));
        }
        for (int i = 0; i < 8; i++) {
            key[i] = k[i].toByteArray();
        }

    }
1189441
public <T> CallOptions withOption(Key<T> key, T value) {
    Preconditions.checkNotNull(key, "key");
    Preconditions.checkNotNull(value, "value");

    CallOptions newOptions = new CallOptions(this);
    int existingIdx = -1;
    for (int i = 0; i < customOptions.length; i++) {
      if (key.equals(customOptions[i][0])) {
        existingIdx = i;
        break;
      }
    }

    newOptions.customOptions = new Object[customOptions.length + (existingIdx == -1 ? 1 : 0)][2];
    System.arraycopy(customOptions, 0, newOptions.customOptions, 0, customOptions.length);

    if (existingIdx == -1) {
      // Add a new option
      newOptions.customOptions[customOptions.length] = new Object[] {key, value};
    } else {
      // Replace an existing option
      newOptions.customOptions[existingIdx] = new Object[] {key, value};
    }

    return newOptions;
  }
1081140
def put_ops(self, key, time, ops):
        ''' 
        '''
        if self._store.get(key) is None:
            self._store[key] = ops
905437
public @Nonnull JsonBuilder put(String key, boolean b) {
        object.put(key, primitive(b));
        return this;
    }
581513
public static boolean optBoolean(JSONObject object, String key)
    {
        return !object.isNull(key) && object.getBoolean(key);
    }
2965
public boolean put(final int key) {
		if (isFull()) { // full
			resizeArray();
		}
		int slot = findSlotByKey(key);
		if (slot >= 0) {
			if (log.isDebugEnabled()) {
				log.debug("key already exists: " + key);
			}
			return false; // key already exist
		}
		slot = ((-slot) - 1);
		return addSlot(slot, key);
	}
533574
@SuppressWarnings("unchecked")
    public void setOps(final DBObject ops) {
        this.ops = (Map<String, Map<String, Object>>) ops;
    }
1160505
public void put(K key, V value) {

        m_forwardMap.put(key, value);
        m_reverseMap.put(value, key);

    }
67486
public void put(final K key, final V value) {
		if (map.containsKey(key)) {
			// remove the key from the FIFO queue
			queue.remove(key);
		}

		while (queue.size() >= maxSize) {
			K oldestKey = queue.poll();
			if (null != oldestKey) {
				if (listener != null) {
					listener.onRemove(map.remove(oldestKey));
				} else {
					map.remove(oldestKey);
				}
			}
		}
		queue.add(key);
		map.put(key, value);
	}