Search Results for

    Show / Hide Table of Contents

    Class ValueEnumerable<T>

    A IValueEnumerable<T> implementation, wrapping a generic .

    Inheritance
    System.Object
    ValueEnumerable<T>
    StringValueEnumerable
    Implements
    IValueEnumerable<T>
    IEnumerable<T>
    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: MoreStructures.Utilities
    Assembly: MoreStructures.dll
    Syntax
    public class ValueEnumerable<T> : IValueEnumerable<T>
    Type Parameters
    Name Description
    T

    The type of objects of the wrapped enumerable.

    Remarks

    Useful to preserve equality by value in records and other value structures which contain enumerable objects.
    It doesn't cache nor enumerate the underlying MoreStructures.Utilities.ValueEnumerable`1.Enumerable unless GetEnumerator() or a method requiring MoreStructures.Utilities.ValueEnumerable`1.Enumerable items is called.

    Constructors

    | Improve this Doc View Source

    ValueEnumerable(IEnumerable<T>)

    Builds a ValueEnumerable<T> around the provided enumerable.

    Declaration
    public ValueEnumerable(IEnumerable<T> enumerable)
    Parameters
    Type Name Description
    System.Collections.IEnumerable<T> enumerable

    The enumerable to wrap.

    Remarks

    Time and Space Complexity is O(1), as this constructor doesn't enumerate enumerable.

    Methods

    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.Object.Equals(System.Object)
    Remarks

    In the specific case, equality is based on the of the wrapped objects.
    Therefore, Time Complexity is O(n * Te) and Space Complexity is O(Se), where n is the number of elements of the longest MoreStructures.Utilities.ValueEnumerable`1.Enumerable and Te/Se are the time and space costs of System.Object.Equals(System.Object) of two T instances.

    | Improve this Doc View Source

    GetEnumerator()

    Declaration
    public IEnumerator<T> GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator<T>
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.Object.GetHashCode()
    Remarks

    In the specific case, the hash is calculated as an aggregation of the hash codes of the items of the wrapped MoreStructures.Utilities.ValueEnumerable`1.Enumerable object.
    Therefore, Time Complexity is O(n * Te) and Space Complexity is O(Se), where n is the number of elements of the longest MoreStructures.Utilities.ValueEnumerable`1.Enumerable and Te/Se are the time and space costs of System.Object.GetHashCode() of a T instance.

    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()
    Remarks

    In the specific case, the string calculation is delegated to the wrapped object.
    Therefore, Time and Space Complexity are the ones of the specific implementation of System.Object.ToString() of the underlying MoreStructures.Utilities.ValueEnumerable`1.Enumerable.

    Explicit Interface Implementations

    | Improve this Doc View Source

    IEnumerable.GetEnumerator()

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    Implements

    IValueEnumerable<T>
    IEnumerable<>

    Extension Methods

    SuffixStructureNodeExtensions.GetAllSuffixesFor<TEdge, TNode>(TNode, TextWithTerminator)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX