Skip to content

Replace LinkedHashSet<T> with OrderedHashSet<T> #1272

@NightOwl888

Description

@NightOwl888

Is there an existing issue for this?

  • I have searched the existing issues

Task description

J2N 2.2.0-alpha-0042 added an OrderedHashSet<T> that is very similar to the backport of the .NET 9 OrderedDictionary<TKey, TValue> class, which is a more efficient implementation than J2N's LinkedHashSet<T>. It should be a drop-in replacement, but there may be some minor fixup work to do to map to the new API.

The task is to swap all usage of LinkedHashSet<T> with OrderedHashSet<T> and to ensure that all tests pass.

Please use the alias J2N.OrderedHashSet<T> in case Microsoft adds support for this in the future.

Each place where we swap in the new implementation should have the following comment:

// LUCENENET specific: OrderedHashSet<T> is a replacement for LinkedHashSet<E> in the JDK

While optional, there is a related issue here: NightOwl888/ICU4N#126

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Task.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions