|
@@ -427,6 +427,7 @@ type
|
|
destructor Destroy; override;
|
|
destructor Destroy; override;
|
|
function Add(constref AValue: T): Boolean;
|
|
function Add(constref AValue: T): Boolean;
|
|
function Remove(constref AValue: T): Boolean;
|
|
function Remove(constref AValue: T): Boolean;
|
|
|
|
+ procedure Clear;
|
|
function Contains(constref AValue: T): Boolean; inline;
|
|
function Contains(constref AValue: T): Boolean; inline;
|
|
procedure UnionWith(AHashSet: THashSet<T>);
|
|
procedure UnionWith(AHashSet: THashSet<T>);
|
|
procedure IntersectWith(AHashSet: THashSet<T>);
|
|
procedure IntersectWith(AHashSet: THashSet<T>);
|
|
@@ -1617,6 +1618,11 @@ begin
|
|
FInternalDictionary.DoRemove(LIndex, cnRemoved);
|
|
FInternalDictionary.DoRemove(LIndex, cnRemoved);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure THashSet<T>.Clear;
|
|
|
|
+begin
|
|
|
|
+ FInternalDictionary.Clear;
|
|
|
|
+end;
|
|
|
|
+
|
|
function THashSet<T>.Contains(constref AValue: T): Boolean;
|
|
function THashSet<T>.Contains(constref AValue: T): Boolean;
|
|
begin
|
|
begin
|
|
Result := FInternalDictionary.ContainsKey(AValue);
|
|
Result := FInternalDictionary.ContainsKey(AValue);
|