Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class CollectionUtil

    Methods for manipulating (sorting) collections. Sort methods work directly on the supplied lists and don't copy to/from arrays before/after. For medium size collections as used in the Lucene indexer that is much more efficient.

    Note

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

    Inheritance
    object
    CollectionUtil
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public static class CollectionUtil

    Methods

    IntroSort<T>(IList<T>)

    Sorts the given random access IList<T> in natural order. This method uses the intro sort algorithm, but falls back to insertion sort for small lists.

    Declaration
    public static void IntroSort<T>(IList<T> list)
    Parameters
    Type Name Description
    IList<T> list

    This IList<T>

    Type Parameters
    Name Description
    T

    IntroSort<T>(IList<T>, IComparer<T>)

    Sorts the given IList<T> using the IComparer<T>. This method uses the intro sort algorithm, but falls back to insertion sort for small lists.

    Declaration
    public static void IntroSort<T>(IList<T> list, IComparer<T> comp)
    Parameters
    Type Name Description
    IList<T> list

    This IList<T>

    IComparer<T> comp

    The IComparer<T> to use for the sort.

    Type Parameters
    Name Description
    T

    TimSort<T>(IList<T>)

    Sorts the given IList<T> in natural order. This method uses the Tim sort algorithm, but falls back to binary sort for small lists.

    Declaration
    public static void TimSort<T>(IList<T> list)
    Parameters
    Type Name Description
    IList<T> list

    This IList<T>

    Type Parameters
    Name Description
    T

    TimSort<T>(IList<T>, IComparer<T>)

    Sorts the given IList<T> using the IComparer<T>. This method uses the Tim sort algorithm, but falls back to binary sort for small lists.

    Declaration
    public static void TimSort<T>(IList<T> list, IComparer<T> comp)
    Parameters
    Type Name Description
    IList<T> list

    this IList<T>

    IComparer<T> comp

    The IComparer<T> to use for the sort.

    Type Parameters
    Name Description
    T
    Back to top Copyright © 2024 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.