.. index:: 
  !ImageDict.containsKey Method
  
.. _id3_face_image_dict_contains_key_class_method:

===============================================================================
ImageDict.containsKey Method
===============================================================================

Module: :ref:`ImageDict<id3_face_image_dict_class>`

Definition
----------

Determines whether the ImageDictobject contains the specified key.


.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        contains_key(self, key: str) -> bool

      **Parameters**

        .. line-block::

          ``key`` str
          :guilabel:`in` The key to locate in the Image object.


      **Returns**

        .. line-block::

          ``bool``
          true if the Image object contains an element with the specified key, otherwise false.

      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: Dart
      :sync: Dart

      .. code:: Dart

        bool containsKey(String? key)

      **Parameters**

        .. line-block::

          ``key`` String
          :guilabel:`in` The key to locate in the Image object.


      **Returns**

        .. line-block::

          ``bool``
          true if the Image object contains an element with the specified key, otherwise false.

      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: C#
      :sync: C#

      .. code:: C#

        public bool ContainsKey(string key)

      **Parameters**

        .. line-block::

          ``key`` string
          :guilabel:`in` The key to locate in the Image object.


      **Returns**

        .. line-block::

          ``bool``
          true if the Image object contains an element with the specified key, otherwise false.

      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: Java
      :sync: Java

      .. code:: Java

        public boolean containsKey(String key) throws FaceException

      **Parameters**

        .. line-block::

          ``key`` String
          :guilabel:`in` The key to locate in the Image object.


      **Returns**

        .. line-block::

          ``boolean``
          true if the Image object contains an element with the specified key, otherwise false.

      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: Swift
      :sync: Swift

      .. code:: Swift

        public func containsKey(key: String) throws -> Bool

      **Parameters**

        .. line-block::

          ``key`` String
          :guilabel:`in` The key to locate in the Image object.


      **Returns**

        .. line-block::

          ``Bool``
          true if the Image object contains an element with the specified key, otherwise false.

      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: C
      :sync: C

      .. code:: C

        int id3FaceImageDict_ContainsKey (
            ID3_FACE_IMAGE_DICT hImageDict, 
            const char * key, 
            bool * result)

      **Parameters**

        .. line-block::

          ``hImageDict`` :ref:`ID3_FACE_IMAGE_DICT<id3_face_image_dict_class>`
          :guilabel:`in` Handle to the ImageDict object.

          ``key`` const char *
          :guilabel:`in` The key to locate in the Image object.

          ``result`` bool *
          :guilabel:`out` true if the Image object contains an element with the specified key, otherwise false.


      **Returns**

        .. line-block::

          ``int``
          An error code.
          See :ref:`id3FaceError<id3_face_face_error_enum>` file for the list of possible error codes.


