Search Results for

    Show / Hide Table of Contents

    Interface IZoneTreeIterator<TKey, TValue>

    The ZoneTree iterator interface.

    Inherited Members
    IDisposable.Dispose()
    Namespace: Tenray.ZoneTree
    Assembly: ZoneTree.dll
    Syntax
    public interface IZoneTreeIterator<TKey, TValue> : IDisposable
    Type Parameters
    Name Description
    TKey

    The key type

    TValue

    The value type

    Properties

    | Improve this Doc View Source

    AutoRefresh

    If true, the iterator automatically refreshes itself to include the latest segments.

    Declaration
    bool AutoRefresh { get; }
    Property Value
    Type Description
    bool
    | Improve this Doc View Source

    Current

    Gets the current element at the iterator's position.

    Declaration
    KeyValuePair<TKey, TValue> Current { get; }
    Property Value
    Type Description
    KeyValuePair<TKey, TValue>
    | Improve this Doc View Source

    CurrentKey

    Returns the element key if there is an element in the iterator position.

    Declaration
    TKey CurrentKey { get; }
    Property Value
    Type Description
    TKey
    | Improve this Doc View Source

    CurrentValue

    Returns the element value if there is an element in the iterator position.

    Declaration
    TValue CurrentValue { get; }
    Property Value
    Type Description
    TValue
    | Improve this Doc View Source

    HasCurrent

    Returns true if there is an element in the iterator position.

    Declaration
    bool HasCurrent { get; }
    Property Value
    Type Description
    bool

    Methods

    | Improve this Doc View Source

    Next()

    Iterates to the next element.

    Declaration
    bool Next()
    Returns
    Type Description
    bool

    true if next element exists, otherwise false.

    | Improve this Doc View Source

    Refresh()

    Refreshes the iterator with latest segments. If AutoRefresh property is true, there is no need to call refresh manually.

    Declaration
    void Refresh()
    | Improve this Doc View Source

    Seek(in TKey)

    Seeks the iterator to the position where next item is the key. If key does not exist, forward iterator's next item is the first greater item (prefix search forward). reverse iterator's next item is the last smaller item (prefix search backward). Complexity: O(log(N))

    Declaration
    void Seek(in TKey key)
    Parameters
    Type Name Description
    TKey key

    The search key

    | Improve this Doc View Source

    SeekFirst()

    Seeks the first element of the iterator.

    Declaration
    void SeekFirst()
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2022 Tenray.io