/// <summary> /// Default ctor /// </summary> public HashSet(IEnumerable <T> source) { hset = new Java.Util.HashSet <T>(); foreach (var item in source) { hset.Add(item); } }
/// <summary> /// Default ctor /// </summary> public HashSet(IEnumerable <T> source, IEqualityComparer <T> comparer) { hset = new Java.Util.HashSet <T>(); foreach (var item in source) { hset.Add(item); } }
/// <summary> /// Default ctor /// </summary> public HashSet(IEqualityComparer <T> comparer) { if (comparer != null && comparer != EqualityComparer <T> .Default) { throw new NotImplementedException("comparer not supported"); } hset = new Java.Util.HashSet <T>(); }
public CustomMultiSelectListPreferenceDialogFragment(string key) { if (string.IsNullOrEmpty(key)) { throw new ArgumentNullException(nameof(key)); } var bundle = new Bundle(1); bundle.PutString(ArgKey, key); Arguments = bundle; _newValues = new Java.Util.HashSet(); }
public virtual bool OnSelection(MaterialDialog dialog, int[] which, string[] text) { preference.OnClick(null, (int)DialogButtonType.Positive); dialog.Dismiss(); var values = new Java.Util.HashSet(); foreach (string s in text) { values.Add((string)s); } if (preference.CallChangeListener(values)) { preference.Values = text.ToList(); } return(true); }
public void IntersectWith(IEnumerable <T> other) { var wrap = other as IJavaCollectionWrapper <T>; if (wrap != null) { hset.RetainAll((Java.Util.ICollection <object>)wrap.Collection); } else { var remove = new Java.Util.HashSet <T>(hset); foreach (var e in other) { remove.Remove(e); } hset.RemoveAll((Java.Util.ICollection <object>)remove); } }
///// <summary> ///// Default ctor ///// </summary> public HashSet(IEnumerable <T> source, IEqualityComparer <T> comparer) { if (comparer != null && comparer != EqualityComparer <T> .Default) { throw new NotImplementedException("comparer not supported"); } var wrap = source as IJavaCollectionWrapper <T>; if (wrap != null) { hset = new Java.Util.HashSet <T>(wrap.Collection); } else { hset = new Java.Util.HashSet <T>(); foreach (var item in source) { hset.Add(item); } } }
/// <summary> /// Default ctor /// </summary> public HashSet() { hset = new Java.Util.HashSet <T>(); }
/// <summary> /// Default ctor /// </summary> public HashSet(IEqualityComparer <T> comparer) { hset = new Java.Util.HashSet <T>(); }