Class TAdMap

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TAdMap = class(TObject)

Description

A simple bucket hash map class.

Hierarchy

Overview

Methods

Public constructor Create(ACapacity: integer=128);
Public destructor Destroy; override;
Public function Insert(AKey:TAdMapKey; AValue:TObject):Boolean;
Public function GetValue(AKey:TAdMapKey):TObject;
Public function Remove(AKey:TAdMapKey):Boolean;

Properties

Public property Count: integer read FCount;
Public property Capacity: integer read FCapacity;

Description

Methods

Public constructor Create(ACapacity: integer=128);

Creates a new instance of TAdMap. ACapacity specifies the size of the data array the elements are stored in.

Public destructor Destroy; override;

Destroys the instance of TAdMap

Public function Insert(AKey:TAdMapKey; AValue:TObject):Boolean;

Inserts a key connected to a value in the hash map.

Public function GetValue(AKey:TAdMapKey):TObject;

Returns the stored object or nil, if the object is not found. AKey specifies the key you search with.

Public function Remove(AKey:TAdMapKey):Boolean;

Removes the object connected to the key from the hash map

Properties

Public property Count: integer read FCount;

Returns the count of elements in the list

Public property Capacity: integer read FCapacity;

Returns the capacity of the data array.

SourceForge.net Logo


Generated by PasDoc 0.11.0 on 2008-12-31 14:31:59