1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 module com
{ module sun
{ module star
{ module container
{
24 /** maps strings to anys.
29 interface XStringKeyMap
31 /** reads data from the map.
34 The key string which should be searched for.
37 the value matching aKey.
39 @throws com::sun::star::container::NoSuchElementException
40 if an element under aKey does not exist.
42 any getValue
( [in] string aKey
)
43 raises
( com
::sun
::star
::container
::NoSuchElementException
);
46 /** checks for element existence.
49 The key string which should be searched for.
52 true if an element with key aKey exists.
54 boolean hasValue
( [in] string aKey
);
57 /** writes data to the map.
60 The key string which should be used to store the value.
63 The value that should be stored.
65 @throws com::sun::star::lang::IllegalArgumentException
66 if the element could not be inserted.
68 @throws com::sun::star::container::ElementExistException
69 if there is already a value stored under the key aKey.
71 void insertValue
( [in] string aKey
, [in] any aValue
)
72 raises
( com
::sun
::star
::lang
::IllegalArgumentException
,
73 com
::sun
::star
::container
::ElementExistException
);
76 /** the number of elements in the map.
78 [attribute
, readonly] long Count
;
81 /** obtains the key of an element by index.
84 is the index of the element.
87 the key string matching the given index.
89 @throws com::sun::star::lang::IndexOutOfBoundsException
90 if the specified index is greater than the number of
93 string getKeyByIndex
( [in] long nIndex
)
94 raises
( com
::sun
::star
::lang
::IndexOutOfBoundsException
);
97 /** obtains the value of an element by index.
100 is the index of the key.
103 the value matching the given index.
105 @throws com::sun::star::lang::IndexOutOfBoundsException
106 if the specified index is greater than the number of
109 any getValueByIndex
( [in] long nIndex
)
110 raises
( com
::sun
::star
::lang
::IndexOutOfBoundsException
);
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */