uses
  ultimate_generic_hashmap,
  ultimate_generic_quicksort,
  hashfunc_djb2,
  ansistring_traits,
  default_allocator,
  plain_traits,
  hashmap_string_to_pointer;

type
TSpecializedHashMap = specialize TUltimateGenericHashmap<
  AnsiString, TAnsiStringTraits,
  AnsiString, TAnsiStringTraits,
  UInt32, THashFuncDjb2, THashFuncDjb2.TInitializer,
  TDefaultAllocator, TDefaultAllocator.TInitializer
>;

var
  HashMap: TSpecializedHashMap;
  Value: PAnsiString;

begin
  HashMap.Init(THashFuncDjb2.DefaultInitializer, TDefaultAllocator.DefaultInitializer);
  if not HashMap.Put('foo', 'bar') then
    Writeln(stderr, 'Out of memory');
  if HashMap.Find('foo', Value) then
    Writeln('Found: ', Value^);
  if not HashMap.Find('baz', Value) then
    Writeln('Not found value for baz');
  HashMap.Done;
end.
