Units Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers |
Class TGenHashSet
Unit
GContnrs
Declaration
type generic TGenHashSet<_TItem_> = class(TAbstractHashSet)
Description
no description available, TAbstractHashSet description follows no description available, TContainer description follows Hierarchy
Overview
Internal Types
|
THashItem = function (const Item: _TItem_) : Integer of object; |
|
TItemEquals = function (const A, B: _TItem_) : Boolean of object; |
|
TItemToString = function (const Item: _TItem_) : String of object; |
Methods
Properties
Description
Internal Types
|
THashItem = function (const Item: _TItem_) : Integer of object; |
|
|
TItemEquals = function (const A, B: _TItem_) : Boolean of object; |
|
|
TItemToString = function (const Item: _TItem_) : String of object; |
|
Methods
|
procedure Clear; |
Removes all the items from the container.
|
|
function Contains(const Item: _TItem_) : Boolean; |
Returns true if the container contains Item.
|
|
constructor Create(InitialCapacity: Integer = 16); |
Creates an empty hash set and sets his capacity to InitialCapacity.
|
|
constructor Create(LoadFact: Real); |
Creates an empty hash set and sets his load factor to LoadFact.
|
|
constructor Create(InitialCapacity: Integer; LoadFact: Real); |
Creates an empty hash set and sets his capacity to InitialCapacity and his load factor to LoadFact.
|
|
function DefaultItemsEqual(const A, B: _TItem_) : Boolean; virtual; |
|
|
function DefaultItemToString(const Item: _TItem_) : String; virtual; |
|
|
function DefaultHashItem(const Item: _TItem_) : Integer; virtual; |
|
|
procedure Delete(const Item: _TItem_); |
Checks if Item is present in the container. If a match is found, removes the element from the set. Otherwise, raises an exception.
|
|
procedure DeleteAt(const Position: THashSetCursor); |
Deletes the item designated by Position.
|
|
destructor Destroy; override; |
|
|
procedure Difference(Left, Right: TGenHashSet); |
Clears Self and then adds to Self all the items of Left that are not present in Right.
|
|
procedure Exclude(const Item: _TItem_); |
Checks if Item is present in the container. If a match is found, removes the item from the set.
|
|
procedure ExcludeAll(ASet: TGenHashSet); |
Excludes all the items of ASet.
|
|
function First: THashSetCursor; |
Returns a cursor that designates the first element of the container or NilCursor if the container is empty.
|
|
function GetEnumerator : TEnumerator; |
|
|
procedure Include(const Item: _TItem_); |
Checks if Item is present in the container. If no match is found, inserts the item into the set.
|
|
procedure IncludeAll(ASet: TGenHashSet); |
Includes all the items of ASet.
|
|
procedure Insert(const Item: _TItem_); |
Checks if Item is present in the container. If no match is found, inserts the item into the set. Otherwise, raises an exception.
|
|
procedure Insert(const Item: _TItem_; out Inserted: Boolean); |
Checks if Item is present in the container. If no match is found, inserts the item into the set and sets Inserted to true. Otherwise, sets Inserted to false.
|
|
procedure Intersection(Left, Right: TGenHashSet); |
Clears Self and then adds to Self all the items of Left that are present in Right.
|
|
function IsEmpty: Boolean; inline; |
Returns true if the container is empty.
|
|
function IsSubset(OfSet: TGenHashSet) : Boolean; |
Returns true if all the items in Self are present in OfSet.
|
|
function Overlaps(ASet: TGenHashSet) : Boolean; |
Returns true if at least one item of Self is present in ASet.
|
|
procedure ReadItemAt(const Position: THashSetCursor; out Value: _TItem_); |
|
|
procedure SymmetricDifference(Left, Right: TGenHashSet); |
Clears Self and then adds to Self all the items of Left that are not present in Right all the items of Right that are not present in Left.
|
|
function ToString : String; override; |
Return a string representation for the container.
|
|
procedure Union(Left, Right: TGenHashSet); |
Clears Self and then adds to Self all the items of Left and all the items of Right.
|
Properties
|
property Items[constPosition:THashSetCursor]: _TItem_ read GetItemAt; |
Provides access to the items in the container.
|
|
property OnItemsEqual : TItemEquals read GetOnItemsEqual write SetOnItemsEqual; |
|
|
property OnItemToString : TItemToString read GetItemToString write SetOnItemToString; |
|
|
property OnHashItem : THashItem read GetOnHashItem write SetOnHashItem; |
|
|
property Size : Integer read GetSize; |
|
Generated by PasDoc 0.13.0 on 2014-07-29 16:12:40
|