public static void AddImmutableTypesTo(IICollection <Type> collection) { foreach (Type valueType in immutableTypeSet) { collection.Add(valueType); } }
public virtual bool RetainAll(IICollection c) { bool changed = false; Iterator iter = Iterator(); while (iter.MoveNext()) { Object key = iter.Current; if (!c.Contains(key)) { iter.Remove(); changed = true; } } return(changed); }
public override bool RetainAll(IICollection c) { Object writeLock = GetWriteLock(); lock (writeLock) { TempHashSet <K> backupMap = CreateCopy(); // Write new data in the copied structure if (!backupMap.RetainAll(c)) { return(false); } SaveCopy(backupMap); return(true); } }