Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: container ::

unpublished interface XStringKeyMap
Usage Restrictions
not published
Description
maps strings to anys.
Since
OOo 2.3

Methods' Summary
getValue reads data from the map.  
hasValue checks for element existence.  
insertValue writes data to the map.  
getKeyByIndex obtains the key of an element by index.  
getValueByIndex obtains the value of an element by index.  
Attributes' Summary
Count the number of elements in the map.  
Methods' Details
getValue
any
getValue( [in] string  aKey )
raises( NoSuchElementException );

Description
reads data from the map.
Parameter aKey
The key string which should be searched for.
Returns
the value matching aKey.
Throws
com::sun::star::container::NoSuchElementException if an element under aKey does not exist.
hasValue
boolean
hasValue( [in] string  aKey );

Description
checks for element existence.
Parameter aKey
The key string which should be searched for.
Returns
true if an element with key aKey exists.
insertValue
void
insertValue( [in] string  aKey,
[in] any  aValue )
raises( ::com::sun::star::lang::IllegalArgumentException,
ElementExistException );

Description
writes data to the map.
Parameter aKey
The key string which should be used to store the value.
Parameter aValue
The value that should be stored.
Throws
com::sun::star::lang::IllegalArgumentException if the element could not be inserted.
Throws
com::sun::star::container::ElementExistException if there is already a value stored under the key aKey.
getKeyByIndex
string
getKeyByIndex( [in] long  nIndex )
raises( ::com::sun::star::lang::IndexOutOfBoundsException );

Description
obtains the key of an element by index.
Parameter nIndex
is the index of the element.
Returns
the key string matching the given index.
Throws
com::sun::star::lang::IndexOutOfBoundsException if the specified index is greater than the number of elements
getValueByIndex
any
getValueByIndex( [in] long  nIndex )
raises( ::com::sun::star::lang::IndexOutOfBoundsException );

Description
obtains the value of an element by index.
Parameter nIndex
is the index of the key.
Returns
the value matching the given index.
Throws
com::sun::star::lang::IndexOutOfBoundsException if the specified index is greater than the number of elements
Attributes' Details
Count
[ readonly ] long Count;
Description
the number of elements in the map.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.