def contains(self, item): """ Determines whether this set contains the specified item or not. :param item: (object), the specified item to be searched. :return: (bool), ``true`` if the specified item exists in this set, ``false`` otherwise. """ check_not_none(item, "Value can't be None") item_data = self._to_data(item) request = set_contains_codec.encode_request(self.name, item_data) return self._invoke(request, set_contains_codec.decode_response)
def contains(self, item): """Determines whether this set contains the specified item or not. Args: item: The specified item to be searched. Returns: hazelcast.future.Future[bool]: ``True`` if the specified item exists in this set, ``False`` otherwise. """ check_not_none(item, "Value can't be None") item_data = self._to_data(item) request = set_contains_codec.encode_request(self.name, item_data) return self._invoke(request, set_contains_codec.decode_response)
def contains(self, item: ItemType) -> Future[bool]: """Determines whether this set contains the specified item or not. Args: item: The specified item to be searched. Returns: ``True`` if the specified item exists in this set, ``False`` otherwise. """ check_not_none(item, "Value can't be None") try: item_data = self._to_data(item) except SchemaNotReplicatedError as e: return self._send_schema_and_retry(e, self.contains, item) request = set_contains_codec.encode_request(self.name, item_data) return self._invoke(request, set_contains_codec.decode_response)