Handles a cluster multi-map contains command.
433267
private void doMultiMapContains(final Message<JsonObject> message) {
    final String name = message.body().getString("name");
    if (name == null) {
      message.reply(new JsonObject().putString("status", "error").putString("message", "No name specified."));
      return;
    }

    final Object key = message.body().getValue("key");
    final Object value = message.body().getValue("value");

    if (key != null && value != null) {
      context.execute(new Action<Boolean>() {
        @Override
        public Boolean perform() {
          return data.getMultiMap(formatKey(name)).containsEntry(key, value);
        }
      }, new Handler<AsyncResult<Boolean>>() {
        @Override
        public void handle(AsyncResult<Boolean> result) {
          if (result.failed()) {
            message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
          } else {
            message.reply(new JsonObject().putString("status", "ok").putBoolean("result", result.result()));
          }
        }
      });
    } else if (key != null) {
      context.execute(new Action<Boolean>() {
        @Override
        public Boolean perform() {
          return data.getMultiMap(formatKey(name)).containsKey(key);
        }
      }, new Handler<AsyncResult<Boolean>>() {
        @Override
        public void handle(AsyncResult<Boolean> result) {
          if (result.failed()) {
            message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
          } else {
            message.reply(new JsonObject().putString("status", "ok").putBoolean("result", result.result()));
          }
        }
      });
    } else if (value != null) {
      context.execute(new Action<Boolean>() {
        @Override
        public Boolean perform() {
          return data.getMultiMap(formatKey(name)).containsValue(key);
        }
      }, new Handler<AsyncResult<Boolean>>() {
        @Override
        public void handle(AsyncResult<Boolean> result) {
          if (result.failed()) {
            message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
          } else {
            message.reply(new JsonObject().putString("status", "ok").putBoolean("result", result.result()));
          }
        }
      });
    } else {
      message.reply(new JsonObject().putString("status", "error").putString("message", "No key or value specified."));
    }
  }
80812
public boolean containsActionCommand(String commandId) {
        
        if (commandMap.containsKey(commandId)) {
            return true;
        }
        
        if (parent != null) {
            return parent.containsActionCommand(commandId);
        }
        
        return false;
        
    }
1057601
def _map_arg_names(source, mapping):
        """"""
        return {cartopy_name: source[cf_name] for cartopy_name, cf_name in mapping
                if cf_name in source}
1342015
function _Overlay_findSiblings(commands) {
                    // Now make sure they're all in this container
                    var siblings = [];
                    var allCommands = this.element.querySelectorAll(".win-command");
                    var countAll, countIn;
                    for (countAll = 0; countAll < allCommands.length; countAll++) {
                        var found = false;
                        for (countIn = 0; countIn < commands.length; countIn++) {
                            if (commands[countIn] === allCommands[countAll]) {
                                commands.splice(countIn, 1);
                                found = true;
                                break;
                            }
                        }
                        if (!found) {
                            siblings.push(allCommands[countAll]);
                        }
                    }
                    return siblings;
                }
203011
def contained(self, key, include_self=True, exclusive=False, biggest_first=True, only=None):
        
        if 'RoW' not in self:
            if key == 'RoW':
                return ['RoW'] if 'RoW' in (only or []) else []
            elif only and 'RoW' in only:
                only.pop(only.index('RoW'))

        possibles = self.topology if only is None else {k: self[k] for k in only}

        faces = self[key]
        lst = [
            (k, len(v))
            for k, v in possibles.items()
            if v and faces.issuperset(v)
        ]
        return self._finish_filter(lst, key, include_self, exclusive, biggest_first)
552816
def contains_value(self, value):
        
        check_not_none(value, "value can't be None")
        return self._encode_invoke_on_target_partition(replicated_map_contains_value_codec, value=self._to_data(value))
712296
public static <K, V> ListMultimap<K, V> newLinkedHashListMultimap(Multimap<K, V> multimap) {
		int keySetSize = multimap.keySet().size();
		int expectedKeys = Math.max(keySetSize, 2);
		ListMultimap<K, V> result = newLinkedHashListMultimap(expectedKeys,	Math.max(3, multimap.size() / expectedKeys));
		result.putAll(multimap);
		return result;
	}
695318
function contains(collection, target) {
	let containsTarget = false;
	collection.some((object) => {
		if (object === target) {
			containsTarget = true;
			return true;
		}
		return false;
	});
	return containsTarget;
}
1339011
def contains(self, key):
        """"""
        if self._jconf is not None:
            return self._jconf.contains(key)
        else:
            return key in self._conf
1310804
public void contains(@NullableDecl Object rowKey, @NullableDecl Object columnKey) {
    if (!actual().contains(rowKey, columnKey)) {
      fail("contains mapping for row/column", rowKey, columnKey);
    }
  }
126622
def command(command)
      read_preference.with_node(cluster) do |node|
        node.command(name, command, query_options({}))
      end
    end
234540
def _handle_list(self):
        """"""
        self._handle_list_marker()
        while self._read(1) in ("#", "*", ";", ":"):
            self._head += 1
            self._handle_list_marker()
1191849
def select(self, *cluster_ids):
        """"""
        # HACK: allow for `select(1, 2, 3)` in addition to `select([1, 2, 3])`
        # This makes it more convenient to select multiple clusters with
        # the snippet: `:c 1 2 3` instead of `:c 1,2,3`.
        if cluster_ids and isinstance(cluster_ids[0], (tuple, list)):
            cluster_ids = list(cluster_ids[0]) + list(cluster_ids[1:])
        # Remove non-existing clusters from the selection.
        cluster_ids = self._keep_existing_clusters(cluster_ids)
        # Update the cluster view selection.
        self.cluster_view.select(cluster_ids)
558116
def _emit_select(self, cluster_ids, **kwargs):
        """"""
        # Remove non-existing clusters from the selection.
        cluster_ids = self._keep_existing_clusters(cluster_ids)
        logger.debug("Select cluster(s): %s.",
                     ', '.join(map(str, cluster_ids)))
        self.emit('select', cluster_ids, **kwargs)
203975
function(cmd) {
    cmd.unshift('drush');
    var runDef = terminusContainer();
    runDef.opts.mode = 'collect';
    return run('usermap', cmd, runDef);
  }
118097
private void handleClusterEvent(ClusterMembershipEvent event) {
    threadContext.execute(() -> {
      if (event.type() == ClusterMembershipEvent.Type.MEMBER_REMOVED) {
        for (Session session : sessions.values()) {
          if (session.memberId().equals(event.subject().id())) {
            role.expire((PrimaryBackupSession) session);
          }
        }
      }
    });
  }
1364851
def list_contains(list_of_strings, substring, return_true_false_array=False):
    
    key_tf = [keyi.find(substring) != -1 for keyi in list_of_strings]
    if return_true_false_array:
        return key_tf
    keys_to_remove = list_of_strings[key_tf]
    return keys_to_remove