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); } } }
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); } } }
/// <summary> /// Add the given item to this collection. /// </summary> public void Add(T item) { collection.Add(item); }