Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class MergedEnumerator<T>

    Provides a merged sorted view from several sorted iterators.

    If built with Lucene.Net.Util.MergedEnumerator`1.removeDuplicates set to true and an element appears in multiple iterators then it is deduplicated, that is this iterator returns the sorted union of elements.

    If built with Lucene.Net.Util.MergedEnumerator`1.removeDuplicates set to false then all elements in all iterators are returned.

    Caveats:

    • The behavior is undefined if the iterators are not actually sorted.
    • Null elements are unsupported.
    • If Lucene.Net.Util.MergedEnumerator`1.removeDuplicates is set to true and if a single iterator contains duplicates then they will not be deduplicated.
    • When elements are deduplicated it is not defined which one is returned.
    • If Lucene.Net.Util.MergedEnumerator`1.removeDuplicates is set to false then the order in which duplicates are returned isn't defined.

    The caller is responsible for disposing the System.Collections.Generic.IEnumerator<T> instances that are passed into the constructor, MergedEnumerator<T> doesn't do it automatically.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Inheritance
    System.Object
    MergedEnumerator<T>
    Implements
    System.Collections.Generic.IEnumerator<T>
    System.Collections.IEnumerator
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class MergedEnumerator<T> : IEnumerator<T>, IEnumerator, IDisposable where T : IComparable<T>
    Type Parameters
    Name Description
    T

    Constructors

    | Improve this Doc View Source

    MergedEnumerator(Boolean, IEnumerator<T>[])

    Declaration
    public MergedEnumerator(bool removeDuplicates, params IEnumerator<T>[] enumerators)
    Parameters
    Type Name Description
    System.Boolean removeDuplicates
    System.Collections.Generic.IEnumerator<T>[] enumerators
    | Improve this Doc View Source

    MergedEnumerator(Boolean, IList<IEnumerator<T>>)

    Declaration
    public MergedEnumerator(bool removeDuplicates, IList<IEnumerator<T>> enumerators)
    Parameters
    Type Name Description
    System.Boolean removeDuplicates
    System.Collections.Generic.IList<System.Collections.Generic.IEnumerator<T>> enumerators
    | Improve this Doc View Source

    MergedEnumerator(IEnumerator<T>[])

    Declaration
    public MergedEnumerator(params IEnumerator<T>[] enumerators)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerator<T>[] enumerators
    | Improve this Doc View Source

    MergedEnumerator(IList<IEnumerator<T>>)

    Declaration
    public MergedEnumerator(IList<IEnumerator<T>> enumerators)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<System.Collections.Generic.IEnumerator<T>> enumerators

    Properties

    | Improve this Doc View Source

    Current

    Declaration
    public T Current { get; }
    Property Value
    Type Description
    T

    Methods

    | Improve this Doc View Source

    Dispose()

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    MoveNext()

    Declaration
    public bool MoveNext()
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Reset()

    Declaration
    public void Reset()

    Explicit Interface Implementations

    | Improve this Doc View Source

    IEnumerator.Current

    Declaration
    object IEnumerator.Current { get; }
    Returns
    Type Description
    System.Object

    Implements

    System.Collections.Generic.IEnumerator<T>
    System.Collections.IEnumerator
    System.IDisposable
    • Improve this Doc
    • View Source
    Back to top Copyright © 2021 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.