LibreOffice
LibreOffice 24.2 SDK API Reference
|
describes a map between keys and values. More...
import"XMap.idl";
Exported Interfaces | |
interface | XElementAccess |
Public Member Functions | |
void | clear () raises ( ::com::sun::star::lang::NoSupportException ) |
clears the map, removing all key-value pairs from it. More... | |
boolean | containsKey ([in] any Key) raises ( ::com::sun::star::beans::IllegalTypeException, ::com::sun::star::lang::IllegalArgumentException ) |
determines whether a mapping for he given key exists in the map More... | |
boolean | containsValue ([in] any Value) raises ( ::com::sun::star::beans::IllegalTypeException, ::com::sun::star::lang::IllegalArgumentException ) |
determines whether the map contains a mapping to a given value. More... | |
any | get ([in] any Key) raises ( ::com::sun::star::beans::IllegalTypeException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException ) |
gets the value to which a given key maps. More... | |
any | put ([in] any Key, [in] any Value) raises ( ::com::sun::star::lang::NoSupportException, ::com::sun::star::beans::IllegalTypeException, ::com::sun::star::lang::IllegalArgumentException ) |
associates a given key with a given value More... | |
any | remove ([in] any Key) raises ( ::com::sun::star::lang::NoSupportException, ::com::sun::star::beans::IllegalTypeException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException ) |
removes a key-value mapping, given by key, from the map. More... | |
Public Member Functions inherited from XElementAccess | |
type | getElementType () |
boolean | hasElements () |
Public Member Functions inherited from XInterface | |
any | queryInterface ([in] type aType) |
queries for a new interface to an existing UNO object. More... | |
void | acquire () |
increases the reference counter by one. More... | |
void | release () |
decreases the reference counter by one. More... | |
Public Attributes | |
type | KeyType |
denotes the type of the keys in the map. More... | |
type | ValueType |
denotes the type of the values in the map. More... | |
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.
interface XElementAccess |
void clear | ( | ) | ||
raises | ( | ::com::sun::star::lang::NoSupportException | ||
) |
clears the map, removing all key-value pairs from it.
com::sun::star::lang::NoSupportException | if the map is not mutable. |
boolean containsKey | ( | [in] any | Key | ) | |
raises | ( | ::com::sun::star::beans::IllegalTypeException, | |||
::com::sun::star::lang::IllegalArgumentException | |||||
) |
determines whether a mapping for he given key exists in the map
Key | is the key whose presence in the map is to be tested. |
TRUE
if and only if the map contains a mapping for the given key.com::sun::star::beans::IllegalTypeException | if the given key is not of a type which is accepted by the map |
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. |
boolean containsValue | ( | [in] any | Value | ) | |
raises | ( | ::com::sun::star::beans::IllegalTypeException, | |||
::com::sun::star::lang::IllegalArgumentException | |||||
) |
determines whether the map contains a mapping to a given value.
Value | is the value whose presence in the map is to be tested. |
TRUE
if and only one or more keys map to the given value.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. |
com::sun::star::lang::IllegalArgumentException | if the given value is not supported to be put into the map. |
any get | ( | [in] any | Key | ) | |
raises | ( | ::com::sun::star::beans::IllegalTypeException, | |||
::com::sun::star::lang::IllegalArgumentException, | |||||
::com::sun::star::container::NoSuchElementException | |||||
) |
gets the value to which a given key maps.
Key | they key whose associated value is to be returned. |
com::sun::star::beans::IllegalTypeException | if the given key is not of a type which is accepted by the map |
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. |
com::sun::star::container::NoSuchElementException | if there is no value associated with the given key |
any put | ( | [in] any | Key, |
[in] any | Value | ||
) | |||
raises | ( | ::com::sun::star::lang::NoSupportException, | |
::com::sun::star::beans::IllegalTypeException, | |||
::com::sun::star::lang::IllegalArgumentException | |||
) |
associates a given key with a given value
If the map already contains a mapping for the given key, then the old value is replaced by the given new value.
Key | is the key which the given value should be associated with |
Value | is the value which should be associated with the given key |
VOID
if there was no such previous association.com::sun::star::beans::IllegalTypeException | if the given key is not of a type which is accepted by the map |
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. |
com::sun::star::lang::NoSupportException | if the map does not support putting new mappings into it |
any remove | ( | [in] any | Key | ) | |
raises | ( | ::com::sun::star::lang::NoSupportException, | |||
::com::sun::star::beans::IllegalTypeException, | |||||
::com::sun::star::lang::IllegalArgumentException, | |||||
::com::sun::star::container::NoSuchElementException | |||||
) |
removes a key-value mapping, given by key, from the map.
Key | is the key whose mapping should be removed from the map |
com::sun::star::beans::IllegalTypeException | if the given key is not of a type which is accepted by the map |
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. |
com::sun::star::lang::NoSupportException | if the map does not support removing mappings |
com::sun::star::container::NoSuchElementException | if there is no value associated with the given key |
|
attributereadonly |
denotes the type of the keys in the map.
Implementations are free to accept any supertype of KeyType
as keys.
|
attributereadonly |
denotes the type of the values in the map.
Implementations are free to accept any supertype of the ValueType
as values.