class EL_ZSTRING_HASH_TABLE

(source code)

Client examples: BENCHMARK_HTMLCHECK_LOCALE_STRINGS_COMMANDCLASS_FILE_NAME_NORMALIZERCLASS_LINK_OCCURRENCE_INTERVALSCORTINA_SETECF_CONSTANTSEIFFEL_CLASS_TABLEEIFFEL_NOTESFEATURE_EDITOR_COMMAND_TEST_SETGENERATE_RBOX_DATABASE_FIELD_ENUMID3_EDITORIMPORT_VIDEOS_TEST_TASKISE_CLASS_TABLEMARKDOWN_RENDERERNOTE_EDITOR_TEST_SETOVERRIDE_FEATURE_EDITORPRAAT_GCC_SOURCE_TO_MSVC_CONVERTOR

description

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