Search Results for

    Show / Hide Table of Contents

    Class InterningCache<T>

    A cache that interns values: it maps each input value to a value that is structurally equal to the input and all structurally equal input values are mapped to the same output value as long as that output value is live.

    Inheritance
    object
    InterningCache<T>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.Collections
    Assembly: Flame.dll
    Syntax
    public sealed class InterningCache<T> where T : class
    Type Parameters
    Name Description
    T

    Constructors

    | Edit this page View Source

    InterningCache(IEqualityComparer<T>)

    Creates an interning cache from a comparer.

    Declaration
    public InterningCache(IEqualityComparer<T> comparer)
    Parameters
    Type Name Description
    IEqualityComparer<T> comparer

    A comparer that tests if input values are structurally equal.

    | Edit this page View Source

    InterningCache(IEqualityComparer<T>, Func<T, T>)

    Creates an interning cache from a comparer and an initialization function.

    Declaration
    public InterningCache(IEqualityComparer<T> comparer, Func<T, T> initialize)
    Parameters
    Type Name Description
    IEqualityComparer<T> comparer

    A comparer that tests if input values are structurally equal.

    Func<T, T> initialize

    A function that initializes output values.

    Methods

    | Edit this page View Source

    Intern(T)

    Interns a particular value.

    Declaration
    public T Intern(T value)
    Parameters
    Type Name Description
    T value

    An input value.

    Returns
    Type Description
    T

    A value that is structurally equal to the input value.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX