[Overview][Types][Classes][Procedures and functions] Reference for unit 'contnrs' (#fcl)

TFPHashTable.Add

Add a new key and its associated data to the hash.

Declaration

Source position: contnrs.pp line 234

public procedure TFPHashTable.Add(

  const aKey: String;

  AItem: pointer

); virtual;

Arguments

aKey

  

Key to add

AItem

  

Data to associate with key

Description

Addcalculates the hash value of aKeyand adds key and it's associated data to the corresponding hash chain.

A given key can only be added once. It is an error to attempt to add the same key value twice.

Errors

If the key is already in the list, adding it a second time will raise an EDuplicate.

See also

TFPHashTable.Find

  

Search for an item with a certain key value.

TFPHashTable.Delete

  

Delete a key from the hash list.