protected override bool IsSupersetOf(ImmSortedSet <T> other) { return(Root.IsSupersetOf(other.Root)); }
protected override SetRelation RelatesTo(ImmSortedSet <T> other) { return(Root.Relation(other.Root)); }
protected override ImmSortedSet <T> Intersect(ImmSortedSet <T> other) { return(Root.Intersect(other.Root, Lineage.Mutable(), null).Wrap(Comparer)); }
protected override bool IsDisjointWith(ImmSortedSet <T> other) { return(Root.IsDisjoint(other.Root)); }
protected override ImmSortedSet <T> Except(ImmSortedSet <T> other) { return(Root.Except(other.Root, Lineage.Mutable()).Wrap(Comparer)); }
protected override ImmSortedSet <T> Union(ImmSortedSet <T> other) { return(Root.Union(other.Root, null, Lineage.Mutable()).Wrap(Comparer)); }
public ImmSortedSetDebugView(ImmSortedSet <T> set) { _inner = set; zIterableView = new IterableDebugView <T>(set); }
protected override ImmSortedSet <T> Difference(ImmSortedSet <T> other) { return(Root.SymDifference(other.Root, Lineage.Mutable()).Wrap(Comparer)); }
protected override ISetBuilder <T, ImmSortedSet <T> > BuilderFrom(ImmSortedSet <T> collection) { return(new Builder(Comparer, collection.Root)); }
protected override bool IsCompatibleWith(ImmSortedSet <T> other) { return(Comparer.Equals(other.Comparer)); }
/// <summary> /// Returns an empty <see cref="ImmSortedSet{T}"/> using the specified comparer. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="comparer"></param> /// <returns></returns> public static ImmSortedSet <T> CreateOrderedSet <T>(this IComparer <T> comparer) { return(ImmSortedSet <T> .Empty(comparer)); }
/// <summary> /// Converts a sequence of elements to an <see cref="ImmSortedSet{T}"/> using the specified comparer. /// </summary> /// <typeparam name="T">The type of element.</typeparam> /// <param name="items">The sequence to be converted.</param> /// <returns></returns> public static ImmSortedSet <T> ToImmSortedSet <T>(this IEnumerable <T> items) where T : IComparable <T> { return(ImmSortedSet <T> .Empty(null).Union(items)); }
/// <summary> /// Converts a sequence of elements to an <see cref="ImmSortedSet{T}"/> using the specified comparer. /// </summary> /// <typeparam name="T">The type of element.</typeparam> /// <param name="items">The sequence to be converted.</param> /// <param name="cmp">The comparer.</param> /// <returns></returns> public static ImmSortedSet <T> ToImmSortedSet <T>(this IEnumerable <T> items, IComparer <T> cmp) { return(ImmSortedSet <T> .Empty(cmp).Union(items)); }
/// <summary> /// Returns an empty instance of <see cref="ImmSortedSet{T}"/> using the specified comparer. /// </summary> /// <typeparam name="T">The type of element.</typeparam> /// <param name="cmp">The comparer.</param> /// <returns></returns> public static ImmSortedSet <T> Empty <T>(IComparer <T> cmp) { return(ImmSortedSet <T> .Empty(cmp)); }
/// <summary> /// Returns an empty <see cref="ImmSortedSet{T}"/> using the default comparison semantics of the type. /// </summary> /// <typeparam name="T">The type of element.</typeparam> /// <returns></returns> public static ImmSortedSet <T> Empty <T>() where T : IComparable <T> { return(ImmSortedSet <T> .Empty(null)); }