Package COM.INFORMATIMAGO.COMMON-LISP.CESARUM.DICTIONARY


Implements a DICTIONARY API over HASH-TABLE, P-LIST, A-LIST and an
ADAPTATIVE-DICTIONARY class that automatically switch between
HASH-TABLE and A-LIST depending on the number of entries.


License:

    AGPL3

    Copyright Pascal J. Bourguignon 2010 - 2015

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.
    If not, see <http://www.gnu.org/licenses/>

a-list
class
A dictionary implemented as an A-list.
Class precedence list: A-LIST DICTIONARY-CLASS STANDARD-OBJECT T
Class init args: TEST DATA
adaptating-dictionary
class
A dictionary that changes between an A-list implementation and a hash-table implementation depending on the number of entries.
Class precedence list: ADAPTATING-DICTIONARY DICTIONARY-CLASS STANDARD-OBJECT T
Class init args: TEST DICTIONARY LIMIT
(adaptating-dictionary-limit dictionary)
generic-function
The number of elements over which the adaptating DICTIONARY
switches to hash-tables, and below which it switches to A-lists.
dictionary-class
class
An abstract Dictionary clas.
Class precedence list: DICTIONARY-CLASS STANDARD-OBJECT T
Class init args: TEST
(dictionary-count dictionary)
generic-function
RETURN: the number of associations in the DICTIONARY.
(dictionary-data dictionary)
generic-function
The data in the dictionary.
(dictionary-delete dictionary key)
generic-function
Remove the KEY from the DICTIONARY.
(dictionary-get dictionary key &optional default)
generic-function
RETURN: The value associated with the KEY in the DICTIONARY.
(dictionary-map fun dictionary)
generic-function
Call the function FUN on each KEY VALUE association in the DICTIONARY.
(dictionary-set dictionary key value)
generic-function
Enter or update the VALUE associated with the KEY into the DICTIONARY.
(dictionary-test dictionary)
generic-function
RETURN: The test function of the dictionary.
(make-dictionary type &key test size contents)
generic-function
TYPE:     Name of a class implementing the dictionary protocol.
TEST:     Restricted to EQL, EQUAL or EQUALP when type is HASH-TABLE.
CONTENTS: A p-list containing the initial key value pairs.
p-list
class
A dictionary implemented as a P-list.
Class precedence list: P-LIST DICTIONARY-CLASS STANDARD-OBJECT T
Class init args: TEST DATA