TCollections -> OrderedSet

Issue #334 wontfix
Jacek Laskowski created an issue

The TCollections has a factory methods:

class function CreateOrderedSet<T>: IOrderedSet<T>; overload; static;
class function CreateOrderedSet<T>(const comparer: IEqualityComparer<T>): IOrderedSet<T>; overload; static;
class function CreateOrderedSet<T>(const values: array of T): ISet<T>; overload; static;
class function CreateOrderedSet<T>(const values: IEnumerable<T>): ISet<T>; overload; static;

Last methods return ISet<T>, this is mistake?

I use hotfix/1.2.3 branch.

Comments (2)

  1. Stefan Glienke repo owner

    That’s not correct indeed however since 2.0 due to the new hashset implementation sets are ordered anyway (the order of insertion) these methods and the interface IOrderedSet<T> have been removed.

  2. Log in to comment