Skip to main content

ISearchTree

Short summary

Interface for a search tree: a tree with no duplicates of values, like a set

Attention: A duplicate in the context of a search tree is any object that is equal in the evaluation of Object.CompareTo()

Warning: It is essential not to modify the compare value of objects while they are part of a tree data structure. Doing so can result in the destruction of the tree's integrity and lead to various issues such as inability to find elements, compromised search, and loss of the tree's balanced properties. If you have to alter the value, the correct way is: remove from tree, alter, insert. Same applies for foreach / iterate: do not perform any operations changing the compare value

AccessAbstractFinalExtendsImplements
-NoNoITree, ISet-

UML Diagram

Methods

setNodeComparator

Sets a comparator, that is used to compare two nodes of this tree.

Code

Declaration

INTERFACE ISearchTree EXTENDS ITree, ISet