TZHashMap Class Reference

Implements a hash map of interfaces. More...

Inheritance diagram for TZHashMap:

TZAbstractObject IZClonnable TInterfacedObject IZObject

List of all members.

Public Member Functions

 Clear ()
 Clears this hash map and removes all elements.
IZInterface Clone ()
 Clones the instance of this object.
Boolean Equals (const IZInterface Value)
IZInterface Get (const IZInterface Key)
 Gets a interface by it's key.
Integer GetCount ()
 Gets a number of elements in this hash map.
IZCollection GetKeys ()
 Gets a readonly collection of keys.
IZCollection GetValues ()
 Gets a readonly collection of values.
LongInt Hash ()
 Gets a unique hash for this object.
Boolean InstanceOf (const TGUID IId)
 Checks is this object implements a specified interface.
 Put (const IZInterface Key, const IZInterface Value)
 Put a new key/value pair interfaces.
Boolean Remove (IZInterface Key)
 Removes the element from the map by it's key.
string ToString ()
 Converts this object into the string representation.
 TZHashMap ()
 Creates this hash map and assignes main properties.
 ~TZHashMap ()
 Destroys this object and frees the memory.

Public Attributes

Integer Count
IZCollection Keys
IZCollection Values

Private Member Functions

Boolean Equals (const IZInterface &Value)

Private Attributes

IZCollection FKeys
IZCollection FReadOnlyKeys
IZCollection FReadOnlyValues
IZCollection FValues


Detailed Description

Implements a hash map of interfaces.

Definition at line 327 of file ZCollections.pas.


Constructor & Destructor Documentation

TZHashMap::TZHashMap (  ) 

Creates this hash map and assignes main properties.

Definition at line 1308 of file ZCollections.pas.

TZHashMap::~TZHashMap (  ) 

Destroys this object and frees the memory.

Definition at line 1323 of file ZCollections.pas.


Member Function Documentation

TZHashMap::Clear (  ) 

Clears this hash map and removes all elements.

Definition at line 1475 of file ZCollections.pas.

IZInterface TZHashMap::Clone (  ) 

Clones the instance of this object.

Returns:
a reference to the clonned object.

Reimplemented from TZAbstractObject.

Definition at line 1339 of file ZCollections.pas.

Boolean IZObject::Equals ( const IZInterface Value  )  [inherited]

Boolean TZAbstractObject::Equals ( const IZInterface  Value  )  [inherited]

Reimplemented in TZAnyValue.

IZInterface TZHashMap::Get ( const IZInterface  Key  ) 

Gets a interface by it's key.

Parameters:
Key a key interface.
Returns:
a found value interface or nil otherwise.

Definition at line 1364 of file ZCollections.pas.

Integer TZHashMap::GetCount (  ) 

Gets a number of elements in this hash map.

Returns:
a number of elements in this hash map.

Definition at line 1438 of file ZCollections.pas.

IZCollection TZHashMap::GetKeys (  ) 

Gets a readonly collection of keys.

Returns:
a readonly collection of keys.

Definition at line 1414 of file ZCollections.pas.

IZCollection TZHashMap::GetValues (  ) 

Gets a readonly collection of values.

Returns:
a readonly collection of values.

Definition at line 1426 of file ZCollections.pas.

LongInt TZAbstractObject::Hash (  )  [inherited]

Gets a unique hash for this object.

Returns:
a unique hash for this object.

Reimplemented from IZObject.

Definition at line 462 of file ZClasses.pas.

Boolean TZAbstractObject::InstanceOf ( const TGUID  IId  )  [inherited]

Checks is this object implements a specified interface.

Parameters:
IId an interface id.
Returns:
True if this object support the interface.

Reimplemented from IZObject.

Definition at line 488 of file ZClasses.pas.

TZHashMap::Put ( const IZInterface  Key,
const IZInterface  Value 
)

Put a new key/value pair interfaces.

Parameters:
Key a key interface.
Value a value interface.

Definition at line 1388 of file ZCollections.pas.

Boolean TZHashMap::Remove ( IZInterface  Key  ) 

Removes the element from the map by it's key.

Parameters:
Key a key of the element.
Returns:
true of the hash map was changed.

Definition at line 1451 of file ZCollections.pas.

string TZAbstractObject::ToString (  )  [inherited]

Converts this object into the string representation.

Returns:
a string representation for this object.

Reimplemented from IZObject.

Reimplemented in TZCollection, TZUnmodifiableCollection, TZStack, and TZAnyValue.

Definition at line 501 of file ZClasses.pas.


Member Data Documentation

See also:
GetCount For reading

Definition at line 380 of file ZCollections.pas.

Definition at line 332 of file ZCollections.pas.

Definition at line 334 of file ZCollections.pas.

Definition at line 338 of file ZCollections.pas.

Definition at line 336 of file ZCollections.pas.

See also:
GetKeys For reading

Definition at line 383 of file ZCollections.pas.

See also:
GetValues For reading

Definition at line 386 of file ZCollections.pas.


The documentation for this class was generated from the following file:

Generated on Wed Dec 30 08:42:51 2009 for zeoslib by  doxygen 1.5.7.1