kaven-basic - v4.5.0
    Preparing search index...

    Class KavenLinkedList<T>

    Represents a doubly-Linked circular list.

    1.1.19

    2019-03-22

    Type Parameters

    • T

    Implements

    Index

    Constructors

    Properties

    count: number
    EqualityComparer?: TEqualityComparer<T>

    Accessors

    • get Count(): number

      Gets the number of nodes actually contained in the KavenLinkedList.

      Returns number

      The number of nodes actually contained in the KavenLinkedList.

    Methods

    • Adds a new node containing the specified value at the start of the KavenLinkedList.

      Parameters

      • value: T

        The value to add at the start of the KavenLinkedList.

      Returns KavenLinkedListNode<T>

      The new KavenLinkedListNode containing value.

    • Adds a new node containing the specified value at the end of the KavenLinkedList.

      Parameters

      • value: T

        The value to add at the end of the KavenLinkedList.

      Returns KavenLinkedListNode<T>

      The new KavenLinkedListNode containing value.

    • Removes all nodes from the KavenLinkedList.

      Returns void

    • Determines whether a value is in the KavenLinkedList.

      Parameters

      • value: T

        The value to locate in the KavenLinkedList.

      Returns boolean

      true if value is found in the KavenLinkedList; otherwise, false.

    • Finds the first node that contains the specified value.

      Parameters

      • value: T

        he value to locate in the KavenLinkedList.

      Returns undefined | KavenLinkedListNode<T>

      The first KavenLinkedListNode that contains the specified value, if found; otherwise, undefined.

    • Finds the last node that contains the specified value.

      Parameters

      • value: T

        The value to locate in the KavenLinkedList.

      Returns undefined | KavenLinkedListNode<T>

      The last KavenLinkedListNode that contains the specified value, if found; otherwise, undefined.

    • Parameters

      Returns boolean

    • Returns undefined | T

      A random item in the collection without removing it.

    • Removes the first occurrence of the specified value from the KavenLinkedList.

      Parameters

      • value: T

        The value to remove from the KavenLinkedList.

      Returns boolean

      true if the element containing value is successfully removed; otherwise, false. This method also returns false if value was not found in the original KavenLinkedList.

    • Removes the node at the start of the KavenLinkedList.

      Returns void

    • Removes the node at the end of the KavenLinkedList.

      Returns void