/**
* @class MultiHashMapT
- * @brief This class represents a template-based collection of associated keys and values that are organized based on the hash code of the key.
+ * @brief This class represents a template-based collection of associated keys and values that are organized based on the hash code of a key.
*
* @since 2.0
*
- * The %MultiHashMapT class represents a template-based collection of associated keys and values that are organized based on the hash code of the key.
- * There is no limit on the number of elements with the same key, but duplicated elements with the same key are not allowed.
- * The key and value cannot be null. Several methods in the %MultiHashMapT class need an assignment(=) operator of KeyType, and assignment(=) and equivalent(==) operators of ValueType.
+ * The %MultiHashMapT class represents a template-based collection of associated keys and values that are organized based on the hash code of a key.
+ * There is no limit on the number of elements having the same key, but duplicate elements with the same key are not allowed.
+ * The key and value cannot be @c null. Several methods in the %MultiHashMapT class need an assignment(=) operator of KeyType, as well as assignment(=) and equivalent(==) operators of ValueType.
* @n
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/base/hashmap_multihashmap.htm">HashMap and MultiHashMap</a>.
*
* @since 2.0
*
* @return An error code
- * @param[in] capacity The initial capacity
- * @param[in] loadFactor The maximum ratio of elements to buckets
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the specified @c capacity or the @c loadFactor is negative.
+ * @param[in] capacity The initial capacity
+ * @param[in] loadFactor The maximum ratio of elements to buckets
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The specified @c capacity or the specified @c loadFactor is negative.
* @remarks The key type must be a primitive data type.
* @see MultiHashMapT()
*/
* @since 2.0
*
* @return An error code
- * @param[in] map A map to copy
- * @param[in] loadFactor The maximum ratio of elements to buckets @n
- * If it is @c 0, the default load factor(0.75) is used.
+ * @param[in] map The map to copy
+ * @param[in] loadFactor The maximum ratio of elements to buckets @n
+ * If it is @c 0, the default load factor(0.75) is used.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the specified @c loadFactor is negative.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
- * the @c map is modified during the operation of this method.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid
+ * - The specified @c loadFactor is negative.
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred:
+ * - The current state of the instance prohibits the execution of the specified operation.
+ * - The specified @c map is modified during the operation of this method.
* @see MultiHashMapT()
*/
result Construct(const IMultiMapT< KeyType, ValueType >& map, float loadFactor = 0.75)
* @since 2.0
*
* @return An error code
- * @param[in] capacity The initial capacity @n
- * If it is @c 0, the default capacity(16) is used.
- * @param[in] loadFactor The maximum ratio of elements to buckets @n
- * If it is @c 0, the default load factor(0.75) is used.
- * @param[in] provider An instance of the IHashCodeProvider derived class that supplies the hash codes
- * for all keys in this map
- * @param[in] comparer An instance of the IComparer derived class to use when comparing keys
+ * @param[in] capacity The initial capacity @n
+ * If it is @c 0, the default capacity(16) is used.
+ * @param[in] loadFactor The maximum ratio of elements to buckets @n
+ * If it is @c 0, the default load factor(0.75) is used.
+ * @param[in] provider An instance of the IHashCodeProvider derived class that supplies the hash codes
+ * for all the keys in this map
+ * @param[in] comparer An instance of the IComparer derived class to use when comparing the keys
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the specified @c capacity or the @c loadFactor is negative.
- * @remarks The instances of hash code provider and comparer will not be deallocated later from this map.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The specified @c capacity or the specified @c loadFactor is negative.
+ * @remarks The instances of hash code provider and the comparer are not deallocated later from this map.
* @see MultiHashMapT()
*/
result Construct(int capacity, float loadFactor, const IHashCodeProviderT< KeyType >& provider,
* @since 2.0
*
* @return An error code
- * @param[in] map A map to copy
- * @param[in] loadFactor The maximum ratio of elements to buckets @n
- * If it is @c 0, the default load factor(0.75) is used.
- * @param[in] provider An instance of the IHashCodeProvider derived class that supplies the hash codes
- * for all keys in this map
- * @param[in] comparer An instance of the IComparer derived class to use when comparing keys
+ * @param[in] map The map to copy
+ * @param[in] loadFactor The maximum ratio of elements to buckets @n
+ * If it is @c 0, the default load factor(0.75) is used.
+ * @param[in] provider An instance of the IHashCodeProvider derived class that supplies the hash codes
+ * for all the keys in this map
+ * @param[in] comparer An instance of the IComparer derived class to use when comparing the keys
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the specified @c loadFactor is negative.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
- * the @c map is modified during the operation of this method.
- * @remarks The instances of hash code provider and comparer will not be deallocated later from this map.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The specified @c loadFactor is negative.
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred:
+ * - The current state of the instance prohibits the execution of the specified operation.
+ * - The specified @c map is modified during the operation of this method.
+ * @remarks The instances of the hash code provider and the comparer are not deallocated later from this map.
* @see MultiHashMapT()
*/
result Construct(const IMultiMapT< KeyType, ValueType >& map, float loadFactor, const IHashCodeProviderT< KeyType >& provider,
* @since 2.0
*
* @return An error code
- * @param[in] key A key of the value to add
- * @param[in] value A value to add
+ * @param[in] key The key of the value to add
+ * @param[in] value The value to add
* @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_ALREADY_EXIST The specified pair of @c key and @c value already exists.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the comparer has failed to compare the keys.
- * @remarks SetItem() can be used to set value to a key that does not already exist.
- * However, setting a value to a key that already exists overwrites the value.
+ * @exception E_OBJ_ALREADY_EXIST The specified @c key and @c value pair already exists.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The comparer has failed to compare the keys.
+ * @remarks SetItem() can be used to set a value to a key that does not already exist. @n
+ * However, setting a value to a key that already exists overwrites this value.
* @see Remove()
* @see SetValue()
*/
}
/**
- * Gets an enumerator of this map.
+ * Gets the enumerator of this map.
*
* @since 2.0
*
- * @return An enumerator (an instance of the %IMapEnumeratorT derived class) of this map, @n
+ * @return The enumerator (an instance of the IMapEnumeratorT derived class) of this map, @n
* else @c null if an exception occurs
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @remarks If the key has multiple values, the Enumeration proceeds as follows: {A: a}, {B: b}, {B: c}, {B, d}, {C: e}, ...
- * The specific error code can be accessed using the GetLastResult() method.
+ * @remarks
+ * - If the key has multiple values, the enumeration proceeds as follows: @n
+ * {A: a}, {B: b}, {B: c}, {B, d}, {C: e}, ...
+ * - The specific error code can be accessed using the GetLastResult() method.
* @see Tizen::Base::Collection::IEnumerator
* @see Tizen::Base::Collection::IMapEnumerator
*/
}
/**
- * Gets an IMapEnumerator of this map.
+ * Gets the IMapEnumerator of this map.
*
* @since 2.0
*
- * @return An enumerator (an instance of the %IMapEnumeratorT derived class) of this map, @n
+ * @return The enumerator (an instance of the IMapEnumeratorT derived class) of this map, @n
* else @c null if an exception occurs
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @remarks If the key has multiple values, the Enumeration proceeds like this: {A: a}, {B: b}, {B: c}, {B, d}, {C: e}, ...
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @remarks
+ * - If the key has multiple values, the enumeration proceeds like this: @n
+ * {A: a}, {B: b}, {B: c}, {B, d}, {C: e}, ...
+ * - The specific error code can be accessed using the GetLastResult() method.
* @see Tizen::Base::Collection::IEnumerator
* @see Tizen::Base::Collection::IMapEnumerator
*/
}
/**
- * Gets an enumerator of the values associated with the specified key.
+ * Gets the enumerator of the values associated with the specified key.
*
* @since 2.0
*
- * @return An enumerator (an instance of the IEnumeratorT derived class) of the values associated with the specified key, @n
+ * @return The enumerator (an instance of the IEnumeratorT derived class) of the values associated with the specified key, @n
* else @c null if an exception occurs
- * @param[in] key A key to locate
+ * @param[in] key The key to locate
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the comparer has failed to compare the keys.
- * @exception E_OBJ_NOT_FOUND The specified @c key is not found in the map.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The comparer has failed to compare the keys.
+ * @exception E_OBJ_NOT_FOUND The specified @c key has not been found in the map.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @see SetValue()
*/
}
/**
- * Gets a list of all unique keys in this map.
+ * Gets a list of all the unique keys in this map.
*
* @since 2.0
*
- * @return A list of all unique keys in this map, @n
+ * @return The list of all the unique keys in this map, @n
* else @c null if an exception occurs
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
*
* @since 2.0
*
- * @return A list of all the values in this map, @n
+ * @return The list of all the values in this map, @n
* else @c null if an exception occurs
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @return An error code
* @param[in] key The key to remove
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid, or
- * the comparer has failed to compare the keys.
- * @exception E_OBJ_NOT_FOUND The specified @c key is not found in the map.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified input parameter is invalid.
+ * - The comparer has failed to compare the keys.
+ * @exception E_OBJ_NOT_FOUND The specified @c key has not been found in the map.
* @see Add()
*/
virtual result Remove(const KeyType& key)
* @since 2.0
*
* @return An error code
- * @param[in] key The key whose mapping is to remove from the map
- * @param[in] value The value to remove
+ * @param[in] key The key whose mapping is removed from the map
+ * @param[in] value The value to remove
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the comparer has failed to compare the keys.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The comparer has failed to compare the keys.
* @exception E_OBJ_NOT_FOUND The specified @c key and @c value pair is not found in the map.
* @see Add()
*/
}
/**
- * Removes all key-value pairs in this map.
+ * Removes all the key-value pairs in this map.
*
* @since 2.0
*/
}
/**
- * Replaces the value associated with the key with the specified @c newValue.
+ * Replaces the value associated with the key, with the specified @c newValue.
*
* @since 2.0
*
* @return An error code
- * @param[in] key A key
- * @param[in] value A value to replace
- * @param[in] newValue A new value to replace the existing value
+ * @param[in] key The key
+ * @param[in] value The value to replace
+ * @param[in] newValue The new value to replace the existing value
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the comparer has failed to compare the keys.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified input parameter is invalid.
+ * - The comparer has failed to compare the keys.
* @exception E_OBJ_NOT_FOUND The specified @c key and @c value pair is not found in the map.
* @remarks To add a new key-value pair, use the Add() method.
- * @see Add()
* @see GetValuesN()
*/
virtual result SetValue(const KeyType& key, const ValueType& value, const ValueType& newValue)
* @since 2.0
*
* @return An error code
- * @param[in] key A key to locate
- * @param[out] count The number of values whose key is @c key
+ * @param[in] key The key to locate
+ * @param[out] count The number of values whose key is @c key
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the comparer has failed to compare the keys.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The comparer has failed to compare the keys.
* @exception E_OBJ_NOT_FOUND The specified @c key is not found in the map.
*/
virtual result GetCount(const KeyType& key, int& count) const
* @since 2.0
*
* @return An error code
- * @param[in] key The key to locate
- * @param[in] value The value to locate
- * @param[out] out Set to @c true if the map contains the specified key and value pair, @n
- * else @c false
+ * @param[in] key The key to locate
+ * @param[in] value The value to locate
+ * @param[out] out Set to @c true if the map contains the specified key and value pair, @n
+ * else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The current state of the instance prohibits the execution of the specified operation, or
- * the comparer has failed to compare the keys.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The current state of the instance prohibits the execution of the specified operation.
+ * - The comparer has failed to compare the keys.
* @see ContainsKey()
* @see ContainsValue()
*/
* @since 2.0
*
* @return An error code
- * @param[in] key The key to locate
- * @param[out] out Set to @c true if the map contains the specified key, @n
- * else @c false
+ * @param[in] key The key to locate
+ * @param[out] out Set to @c true if the map contains the specified key, @n
+ * else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the comparer has failed to compare the keys.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The comparer has failed to compare the keys.
* @see ContainsValue()
* @see Contains()
*/
* else @c false
* @param[in] obj The object to compare with the current instance
* @remarks This method returns @c true only if the specified object is also an instance of the %MultiHashMapT class,
- * both maps have the same number of elements, and both maps contain the same elements.
+ * both the maps have the same number of elements, and both the maps contain the same elements.
*/
virtual bool Equals(const Object& obj) const
{
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks The two Tizen::Base::Object::Equals() instances must return the same hash value. For better performance, @n
- * the used hash function must generate a random distribution for all inputs.
+ * @remarks The two Tizen::Base::Object::Equals() instances must return the same hash value. @n
+ * For better performance, the used hash function must generate a random distribution for all the inputs.
*/
virtual int GetHashCode(void) const
{
*
* @since 2.0
*
- * @param[in] v An object to include in this node
+ * @param[in] v The object to include in this node
*/
__ValueNodeT(const ValueType& v)
: pNext(null)
*
* @since 2.0
*
- * @param[in] keyType A key to include in this entry
- * @param[in] list A list of values whose key is specified @n
+ * @param[in] keyType The key to include in this entry
+ * @param[in] list The list of values whose key is specified @n
* It cannot be @c null.
* @param[in] next A pointer to the next entry
- * @param[in] h An hash value of the key
+ * @param[in] h The hash value of the key
*/
__MultiHashMapEntryT(const KeyType& keyType, __ValueNodeT< ValueType >* list, __MultiHashMapEntryT< KeyType, ValueType >* next, int h)
: key(keyType)
*
* @since 2.0
*
- * @param[in] map A map to enumerate
+ * @param[in] map The map to enumerate
* @param[in] modCount The modification count to detect the change in the map
*/
__MultiHashMapEnumeratorT(const MultiHashMapT< KeyType, ValueType >& map, int modCount)
*
* @return An error code
* @param[out] obj The current object
- * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred:
* - The current state of the instance prohibits the execution of the specified operation. @n
* - This enumerator is currently positioned before the first element or
- * past the last element. @n
+ * past the last element.
* - The map is modified after this enumerator is created.
* @exception E_SUCCESS The method is successful.
*/
/**
* Moves this enumerator to the next element of the map. @n
* After the enumerator is first created or reset using the Reset() method,
- * the first call to this method positions the enumerator to the first element in the @c collection.
+ * the first call to this method positions the enumerator to the first element in the collection.
*
* @since 2.0
*
* @return An error code
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
- * the map is modified after this enumerator is created.
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred:
+ * - The current state of the instance prohibits the execution of the specified operation.
+ * - The map is modified after this enumerator is created.
* @exception E_OUT_OF_RANGE The enumerator has passed the end of the map.
* @see Reset()
*/
*
* @return An error code
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
- * the map is modified after this enumerator is created.
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred:
+ * - The current state of the instance prohibits the execution of the specified operation.
+ * - The map is modified after this enumerator is created.
*/
result Reset(void)
{
*
* @return An error code
* @param[out] key The current key
- * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred:
* - The current state of the instance prohibits the execution of the specified operation. @n
* - This enumerator is currently positioned before the first element or
- * past the last element. @n
- * - The map is modified after this enumerator is created.
+ * past the last element. @n
+ * - The map is modified after this enumerator is created.
* @exception E_SUCCESS The method is successful.
*/
result GetKey(KeyType& key) const
*
* @return An error code
* @param[out] value The current value
- * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred:
* - The current state of the instance prohibits the execution of the specified operation. @n
* - This enumerator is currently positioned before the first element or
- * past the last element. @n
+ * past the last element. @n
* - The map is modified after the enumerator is created.
* @exception E_SUCCESS The method is successful.
*/
*
* @since 2.0
*
- * @param[in] entry An entry to enumerate
+ * @param[in] entry The entry to enumerate
* @param[in] modCount The modification count to detect the change in the entry
*/
__EntryValueEnumeratorT(const __MultiHashMapEntryT< KeyType, ValueType >& entry, int modCount)
*
* @return An error code
* @param[out] obj The current value
- * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred:
* - The current state of the instance prohibits the execution of the specified operation. @n
* - This enumerator is currently positioned before the first element or
- * past the last element. @n
+ * past the last element.
* - The entry is modified after this enumerator is created.
* @exception E_SUCCESS The method is successful.
*/
*
* @return An error code
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
- * the entry is modified after this enumerator is created.
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred:
+ * - The current state of the instance prohibits the execution of the specified operation.
+ * - The entry is modified after this enumerator is created.
* @exception E_OUT_OF_RANGE The enumerator has passed the end of the entry.
* @see Reset()
*/
*
* @return An error code
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
- * the entry is modified after this enumerator is created.
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred:
+ * - The current state of the instance prohibits the execution of the specified operation.
+ * - The entry is modified after this enumerator is created.
*/
result Reset(void)
{