/// <summary> /// Finds out if this set is a subset of the given set. /// </summary> /// <returns><c>true</c> if all elements in this set are also present in the other set, <c>false</c>otherwise.</returns> /// <param name="otherSet">The other set.</param> public bool IsSubsetOfSet(NSSet otherSet) { lock (set) { foreach (NSObject o in set) { if (!otherSet.ContainsObject(o)) { return(false); } } return(true); } }
/// <summary> /// Finds out whether at least one object is present in both sets. /// </summary> /// <returns><c>true</c> if the intersection of both sets is empty, <c>false</c> otherwise.</returns> /// <param name="otherSet">The other set.</param> public bool IntersectsSet(NSSet otherSet) { lock (set) { foreach (NSObject o in set) { if (otherSet.ContainsObject(o)) { return(true); } } return(false); } }
/// <summary> /// Finds out if this set is a subset of the given set. /// </summary> /// <returns><c>true</c> if all elements in this set are also present in the other set, <c>false</c>otherwise.</returns> /// <param name="otherSet">The other set.</param> public bool IsSubsetOfSet(NSSet otherSet) { lock (set) { foreach (NSObject o in set) { if (!otherSet.ContainsObject(o)) return false; } return true; } }
/// <summary> /// Finds out whether at least one object is present in both sets. /// </summary> /// <returns><c>true</c> if the intersection of both sets is empty, <c>false</c> otherwise.</returns> /// <param name="otherSet">The other set.</param> public bool IntersectsSet(NSSet otherSet) { lock (set) { foreach (NSObject o in set) { if (otherSet.ContainsObject(o)) return true; } return false; } }