mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 13:15:07 +00:00
Merge branch 'setequals' of Common/Utils into dev
This commit is contained in:
@@ -154,6 +154,14 @@ namespace ICD.Common.Utils.Collections
|
|||||||
return (IsSupersetOf(setToCompare) && !setToCompare.IsSupersetOf(this));
|
return (IsSupersetOf(setToCompare) && !setToCompare.IsSupersetOf(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[PublicAPI]
|
||||||
|
public bool SetEquals(IcdHashSet<T> set)
|
||||||
|
{
|
||||||
|
var setToCompare = set ?? NullSet;
|
||||||
|
|
||||||
|
return (IsSubsetOf(setToCompare) && setToCompare.IsSubsetOf(this));
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ICollection<T> Members
|
#region ICollection<T> Members
|
||||||
@@ -165,9 +173,9 @@ namespace ICD.Common.Utils.Collections
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool Add(T item)
|
public bool Add(T item)
|
||||||
{
|
{
|
||||||
// ReSharper disable CompareNonConstrainedGenericWithNull
|
// ReSharper disable CompareNonConstrainedGenericWithNull
|
||||||
if (item == null)
|
if (item == null)
|
||||||
// ReSharper restore CompareNonConstrainedGenericWithNull
|
// ReSharper restore CompareNonConstrainedGenericWithNull
|
||||||
throw new ArgumentNullException("item");
|
throw new ArgumentNullException("item");
|
||||||
|
|
||||||
if (m_Dict.ContainsKey(item))
|
if (m_Dict.ContainsKey(item))
|
||||||
|
|||||||
Reference in New Issue
Block a user