예제 #1
0
        public void UnionWith(IEnumerable <T> other)
        {
            var wrap = other as IJavaCollectionWrapper <T>;

            if (wrap != null)
            {
                collection.AddAll(wrap.Collection);
            }
            else
            {
                foreach (var e in other)
                {
                    collection.Add(e);
                }
            }
        }
예제 #2
0
 private static void AddInterfaces(Type[] interfaces, Java.Util.ISet <Type> ret, Java.Util.IQueue <Type> toVisit)
 {
     foreach (var i in interfaces)
     {
         if (i == typeof(IGenericTypeDefinition))
         {
             continue; // hide this marker interface.
         }
         if (!ret.Contains(i))
         {
             ret.Add(i);
             toVisit.Add(i);
         }
     }
 }
예제 #3
0
 /// <summary>
 /// Add the given item to this collection.
 /// </summary>
 public void Add(T item)
 {
     collection.Add(item);
 }