Esempio n. 1
0
 public static void AddImmutableTypesTo(IICollection <Type> collection)
 {
     foreach (Type valueType in immutableTypeSet)
     {
         collection.Add(valueType);
     }
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
            }
        }