class EL_ZSTRING_HASH_TABLE
Client examples: BENCHMARK_HTML ; CHECK_LOCALE_STRINGS_COMMAND ; CLASS_FILE_NAME_NORMALIZER ; CLASS_LINK_OCCURRENCE_INTERVALS ; CORTINA_SET ; ECF_CONSTANTS ; EIFFEL_CLASS_TABLE ; EIFFEL_NOTES ; FEATURE_EDITOR_COMMAND_TEST_SET ; GENERATE_RBOX_DATABASE_FIELD_ENUM ; ID3_EDITOR ; IMPORT_VIDEOS_TEST_TASK ; ISE_CLASS_TABLE ; MARKDOWN_RENDERER ; NOTE_EDITOR_TEST_SET ; OVERRIDE_FEATURE_EDITOR ; PRAAT_GCC_SOURCE_TO_MSVC_CONVERTOR
Hash table with ZSTRING as lookup key
note
description: "Hash table with ${ZSTRING} as lookup key"
author: "Finnian Reilly"
copyright: "Copyright (c) 2001-2022 Finnian Reilly"
contact: "finnian at eiffel hyphen loop dot com"
license: "MIT license (See: en.wikipedia.org/wiki/MIT_License)"
date: "2024-09-23 6:38:21 GMT (Monday 23rd September 2024)"
revision: "19"
class
EL_ZSTRING_HASH_TABLE [G]
inherit
EL_STRING_HASH_TABLE [G, ZSTRING]
undefine
new_key
end
EL_STRING_GENERAL_ROUTINES
rename
as_zstring as new_key
end
create
default_create, make_assignments, make, make_equal, make_from_tuples, make_one
feature -- Status query
has_general (key: READABLE_STRING_GENERAL): BOOLEAN
-- Is there an item in the table with key `key'?
do
Result := has (Buffer.to_same (key))
end
has_general_key (key: READABLE_STRING_GENERAL): BOOLEAN
-- Is there an item in the table with key `key'? Set `found_item' to the found item.
do
Result := has_key (Buffer.to_same (key))
end
feature -- Basic operations
search_general (key: READABLE_STRING_GENERAL)
-- Search for item of key `key'.
-- If found, set `found' to true, and set
-- `found_item' to item associated with `key'.
do
search (Buffer.to_same (key))
end
feature {NONE} -- Constants
Buffer: EL_ZSTRING_BUFFER
once
create Result
end
end