Table of Contents

Namespace Utils.Collections

Classes

CachedLoader<TKey, TValue>

A class that provides a caching mechanism for loading resources. If a resource is not already loaded, it will be loaded and cached upon first access.

DictionaryExtensions

Provides thread-safe helper methods for working with Dictionary<TKey, TValue> instances.

DictionaryMap<K, V>

Implementation of IDictionaryMap<K, V> that wraps custom handlers for dictionary operations.

DoubleIndexedDictionary<T1, T2>

Represents a dictionary that maintains two-way mappings between keys of type T1 and values of type T2. This allows bidirectional access by both key and value.

EnumerableComparer<T>

Compares two sequences of values of comparable types. Supports custom comparers and optimizations for IReadOnlyList<T> and Span<T> where applicable.

EnumerableEqualityComparer<T>

A comparer for enumerables that allows comparison of sequences based on custom or default equality logic for each element.

If both sequences implement IReadOnlyList<T>, the comparison first checks Count for an early exit. Uses Span<T> when applicable for performance.

EnumerableEx

Extension methods for working with IEnumerable<T> and related collections.

ForwardFusion<T1, T2>

Merges two sorted IEnumerable<T> collections based on the specified join type. The left list is considered the primary list in a left join, and vice versa for a right join.

IndexedList<K, V>

Indexed list.

LRUCache<K, V>

A Least Recently Used (LRU) cache implementation. This cache evicts the least recently accessed items when it reaches its capacity.

MappedDictionary<K, V>

A dictionary that uses a custom mapping for its operations. It allows customization of how the dictionary handles additions, removals, and value retrievals.

ReadOnlyDictionaryMap<K, V>

Default implementation of IReadOnlyDictionaryMap<K, V> that relies on delegate accessors.

ReadOnlyMappedDictionary<K, V>

List whose source is defined by accessors.

SkipListDictionary<K, V>

A dictionary whose keys are kept in sorted order using a SkipList<T> as the underlying data structure. All keyed operations run in O(log n) time on average. Iteration yields entries in ascending key order.

SkipList<T>

Represents a deterministic adaptive skip list that supports fast search, insertion, and deletion operations.

Structs

Pack<T>

Represents a value and its consecutive repetition count (used in packing).

Interfaces

IDictionaryMap<K, V>

Interface representing a modifiable map that supports dictionary operations.

IReadOnlyDictionaryMap<K, V>

Defines accessor methods required to expose dictionary data without granting mutation capabilities.

Enums

JoinType

Specifies the type of join operation.

Delegates

CachedLoader<TKey, TValue>.TryLoadValueDelegate

Represents a method that attempts to load a value associated with the specified key.