Show / Hide Table of Contents

    Class MergedIterator<T>

    Provides a merged sorted view from several sorted iterators.

    If built with Lucene.Net.Util.MergedIterator`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.MergedIterator`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.MergedIterator`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.MergedIterator`1.removeDuplicates is set to false then the order in which duplicates are returned isn't defined.

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

    This is a Lucene.NET INTERNAL API, use at your own risk
    Inheritance
    System.Object
    MergedIterator<T>
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class MergedIterator<T> : IEnumerator<T> where T : IComparable<T>
    Type Parameters
    Name Description
    T

    Constructors

    | Improve this Doc View Source

    MergedIterator(IEnumerator<T>[])

    Declaration
    public MergedIterator(params IEnumerator<T>[] iterators)
    Parameters
    Type Name Description
    IEnumerator<T>[] iterators
    | Improve this Doc View Source

    MergedIterator(Boolean, IEnumerator<T>[])

    Declaration
    public MergedIterator(bool removeDuplicates, params IEnumerator<T>[] iterators)
    Parameters
    Type Name Description
    System.Boolean removeDuplicates
    IEnumerator<T>[] iterators

    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()
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)