src.pydasa.structs.tables.htme ============================== .. py:module:: src.pydasa.structs.tables.htme .. autoapi-nested-parse:: Module htme.py =========================================== Module to represent the **MapEntry** data structure for the **Hash Table** in *PyDASA*. classes: **MapEntry**: Represents a key-value pair in a hash table with type validation and error handling. *IMPORTANT:* based on the implementations proposed by the following authors/books: # . Algorithms, 4th Edition, Robert Sedgewick and Kevin Wayne. # . Data Structure and Algorithms in Python, M.T. Goodrich, R. Tamassia, M.H. Goldwasser. Classes ------- .. autoapisummary:: src.pydasa.structs.tables.htme.MapEntry Module Contents --------------- .. py:class:: MapEntry Bases: :py:obj:`Generic`\ [\ :py:obj:`pydasa.structs.types.generics.T`\ ] **MapEntry** class for creating a map entry in the **Hash Table**. Fundamental for the **Hash Table** data structure. :param Generic: Generic type for a Python data structure. :type Generic: T :returns: A map entry object with the following attributes: - `_key`: The key of the map entry. - `_value`: The value of the map entry. :rtype: MapEntry .. py:property:: key :type: Optional[pydasa.structs.types.generics.T] *key* Property to read the key in the *MapEntry*. Acts as a getter (*get()*) for the *_key* attribute. :returns: recovered key in the *MapEntry*. None if the key is not set. :rtype: Optional[T] .. py:property:: value :type: Optional[pydasa.structs.types.generics.T] *value* Property to read the value in the *MapEntry*. Acts as a getter (*get()*) for the *_value* attribute. :returns: recovered value in the *MapEntry*. None if the value is not set. :rtype: Optional[T] .. py:method:: __str__() *__str__()* function to return a string representation of the *MapEntry*. :returns: string representation of the *MapEntry*. :rtype: str .. py:method:: __repr__() *__repr__()* function to return a string representation of the *MapEntry*. :returns: string representation of the *MapEntry*. :rtype: str