TreeNode.d.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. export declare class TreeNode<K, V> {
  2. constructor(_key?: K, _value?: V);
  3. /**
  4. * @description Get the pre node.
  5. * @return TreeNode about the pre node.
  6. */
  7. pre(): TreeNode<K, V>;
  8. /**
  9. * @description Get the next node.
  10. * @return TreeNode about the next node.
  11. */
  12. next(): TreeNode<K, V>;
  13. /**
  14. * @description Rotate _left.
  15. * @return TreeNode about moved to original position after rotation.
  16. */
  17. rotateLeft(): TreeNode<K, V>;
  18. /**
  19. * @description Rotate _right.
  20. * @return TreeNode about moved to original position after rotation.
  21. */
  22. rotateRight(): TreeNode<K, V>;
  23. }
  24. export declare class TreeNodeEnableIndex<K, V> extends TreeNode<K, V> {
  25. /**
  26. * @description Rotate _left and do recount.
  27. * @return TreeNode about moved to original position after rotation.
  28. */
  29. rotateLeft(): TreeNodeEnableIndex<K, V>;
  30. /**
  31. * @description Rotate _right and do recount.
  32. * @return TreeNode about moved to original position after rotation.
  33. */
  34. rotateRight(): TreeNode<K, V>;
  35. recount(): void;
  36. }