Пример #1
0
        public static MultiSet <T> Union(MultiSet <T> a, MultiSet <T> b)
        {
            Utils.ThrowException(a == null ? new ArgumentNullException("a") : null);
            Utils.ThrowException(b == null ? new ArgumentNullException("b") : null);
            MultiSet <T> c = a.Clone(); // *** inherits comparer from a (b is expected to have the same comparer)

            c.AddRange((IEnumerable <KeyValuePair <T, int> >)b);
            return(c);
        }
Пример #2
0
            // *** IReadOnlyAdapter interface implementation ***

            public MultiSet <T> GetWritableCopy()
            {
                return(mSet.Clone());
            }