This is the base interface of all collection interfaces.
Usage Restrictions
not published
Description
describes a map between keys and values.
Keys in the map are unique, and each key maps to exactly one value.
Locating elements in the map, both values and keys, requires a notion of equality of two objects.
In conformance with the UNO type system,
two values are said to be equal if and only if they have the same type, and both denote the same element of this
type's value set.
See also
Map
for a default implementation of this interface
determines whether a mapping for he given key exists in the map
Parameter Key
is the key whose presence in the map is to be tested.
Returns
true if and only if the map contains a mapping for the given key.
Throws
::com::sun::star::beans::IllegalTypeException
if the given key is not of a type which is accepted by the map
Throws
::com::sun::star::lang::IllegalArgumentException
if the given key is not supported to be put into the map. It's up to the service
implementing the XMap interface to specify which special values are not
supported. For instances, implementations might decide to not allow void keys, or
to reject Double.NaN (not a number) to due its problematic
behavior with respect to equality.
determines whether the map contains a mapping to a given value.
Parameter Value
is the value whose presence in the map is to be tested.
Returns
true if and only one or more keys map to the given value.
Throws
::com::sun::star::beans::IllegalTypeException
if the given value is not of a type which is accepted by the map. It's up to the service
implementing the XMap interface to specify which special values are not
supported. For instances, implementations might decide to not allow Double.NaN
(not a number) to due its problematic behavior with respect to equality.
Throws
::com::sun::star::lang::IllegalArgumentException
if the given value is not supported to be put into the map.
they key whose associated value is to be returned.
Returns
the value which is associated with the given key.
Throws
::com::sun::star::beans::IllegalTypeException
if the given key is not of a type which is accepted by the map
Throws
::com::sun::star::beans::IllegalArgumentException
if the given key is not supported to be put into the map. It's up to the service
implementing the XMap interface to specify which special values are not
supported. For instances, implementations might decide to not allow void keys, or
to reject Double.NaN (not a number) to due its problematic
behavior with respect to equality.
Throws
::com::sun::star::container::NoSuchElementException
if there is no value associated with the given key
If the map already contains a mapping for the given key, then the old value is replaced by the
given new value.
Parameter Key
is the key which the given value should be associated with
Parameter Value
is the value which should be associated with the given key
Returns
the value which was previously associated with the given key, or void
if there was no such previous association.
Throws
::com::sun::star::beans::IllegalTypeException
if the given key is not of a type which is accepted by the map
Throws
::com::sun::star::lang::IllegalArgumentException
if the given key, or the given value, is not supported to be put into the map. It's up to
the service implementing the XMap interface to specify which special values
are not supported.
For instances, implementations might decide to not allow void keys or values, or to
reject Double.NaN (not a number) to due its problematic behavior
with respect to equality.
Throws
::com::sun::star::beans::NoSupportException
if the map does not support putting new mappings into it
removes a key-value mapping, given by key, from the map.
Parameter Key
is the key whose mapping should be removed from the map
Returns
the value which was associated with the given key before the removal
Throws
::com::sun::star::beans::IllegalTypeException
if the given key is not of a type which is accepted by the map
Throws
::com::sun::star::lang::IllegalArgumentException
if the given key is not supported to be put into the map. It's up to the service
implementing the XMap interface to specify which special values are not
supported. For instances, implementations might decide to not allow void keys, or
to reject Double.NaN (not a number) to due its problematic
behavior with respect to equality.
Throws
::com::sun::star::beans::NoSupportException
if the map does not support removing mappings
Throws
::com::sun::star::container::NoSuchElementException
if there is no value associated with the given key