Package com.qfs.dic

Interface IWritableDictionary<K>

    • Method Detail

      • supportConcurrentWrites

        boolean supportConcurrentWrites()
        Returns whether the dictionary supports concurrent writing (Multiple Writer/Multiple Reader) or not.
        Returns:
        true if the dictionary supports concurrent writing, false otherwise
        See Also:
        IDictionary.supportConcurrentReads()
      • map

        int map​(K object)
        Indexes a new object in the dictionary.

        If the object already existed in the dictionary (with respect to the equals / hashCode contract) the previous copy of the object is left in the dictionary. The new object copy can then be safely reused or cleared without any impact to the dictionary consistency.

        Parameters:
        object - the object
        Returns:
        the address of the object in the dictionary buffer
      • mapInt

        int mapInt​(int key)
        Indexes an integer as a new key in the dictionary.

        If the key already existed in the dictionary (with respect to the equals / hashCode contract) the previous copy of the object is left in the dictionary. The new object copy can then be safely reused or cleared without any impact to the dictionary consistency.

        This will throw UnsupportedOperationException if the type Integer is not compatible with the type of the dictionary.

        Parameters:
        key - the integer to map
        Returns:
        the address of the object in the dictionary buffer
      • mapLong

        int mapLong​(long key)
        Indexes a long as a new key in the dictionary.

        If the key already existed in the dictionary (with respect to the equals / hashCode contract) the previous copy of the object is left in the dictionary. The new object copy can then be safely reused or cleared without any impact to the dictionary consistency.

        This will throw UnsupportedOperationException if the type Long is not compatible with the type of the dictionary.

        Parameters:
        key - the long to map
        Returns:
        the address of the object in the dictionary buffer
      • mapFloat

        int mapFloat​(float key)
        Indexes a float as a new key in the dictionary.

        If the key already existed in the dictionary (with respect to the equals / hashCode contract) the previous copy of the object is left in the dictionary. The new object copy can then be safely reused or cleared without any impact to the dictionary consistency.

        This will throw UnsupportedOperationException if the type Float is not compatible with the type of the dictionary.

        Parameters:
        key - the float to map
        Returns:
        the address of the object in the dictionary buffer
      • mapDouble

        int mapDouble​(double key)
        Indexes a double as a new key in the dictionary.

        If the key already existed in the dictionary (with respect to the equals / hashCode contract) the previous copy of the object is left in the dictionary. The new object copy can then be safely reused or cleared without any impact to the dictionary consistency.

        This will throw UnsupportedOperationException if the type Double is not compatible with the type of the dictionary.

        Parameters:
        key - the double to map
        Returns:
        the address of the object in the dictionary buffer
      • mapFromCell

        int mapFromCell​(IReadableCell cell)
        Maps the value stored by a cell into this dictionary.
        Parameters:
        cell - cell containing the value to map
        Returns:
        the dictionary position for the mapped value
      • clear

        void clear()
        Clears the whole content of the dictionary.

        This operation will not recreate or resize the internal data structures of the dictionary, but erase them.

      • destroy

        void destroy()
        Frees all resources held by this data structure.