# dev.inmo.micro_utils.coroutines.collections

# Package-level declarations

## Types

SortedBinaryTreeNode
Link copied to clipboard
@Serializable
class SortedBinaryTreeNode < T >(val data: T , comparator: Comparator < T >) : Iterable < SortedBinaryTreeNode < T >>

## Functions

addSubNode
Link copied to clipboard
suspend fun < T > SortedBinaryTreeNode < T >. addSubNode (newData: T ): SortedBinaryTreeNode < T >

Will add subnode in tree if there are no any node with newData

contains
Link copied to clipboard
suspend fun < T > SortedBinaryTreeNode < T >. contains (data: T ): Boolean
findNode
Link copied to clipboard
suspend fun < T > SortedBinaryTreeNode < T >. findNode (data: T ): SortedBinaryTreeNode < T >?
findNodesInRange
Link copied to clipboard
suspend fun < T : Comparable < T >> SortedBinaryTreeNode < T >. findNodesInRange (range: ClosedRange < T >): Set < SortedBinaryTreeNode < T >>
suspend fun < T > SortedBinaryTreeNode < T >. findNodesInRange (from: T , to: T ): Set < SortedBinaryTreeNode < T >>
suspend fun < T > SortedBinaryTreeNode < T >. findNodesInRange (from: T , to: T , fromInclusiveMode: Boolean , toInclusiveMode: Boolean ): Set < SortedBinaryTreeNode < T >>
findNodesInRangeExcluding
Link copied to clipboard
suspend fun < T > SortedBinaryTreeNode < T >. findNodesInRangeExcluding (from: T , to: T ): Set < SortedBinaryTreeNode < T >>
findParentNode
Link copied to clipboard
suspend fun < T > SortedBinaryTreeNode < T >. findParentNode (data: T ): SortedBinaryTreeNode < T >?
removeSubNode
Link copied to clipboard
suspend fun < T > SortedBinaryTreeNode < T >. removeSubNode (data: T ): Pair < SortedBinaryTreeNode < T >, SortedBinaryTreeNode < T >>?

Will remove (detach) node from tree starting with this