debugHelper<K> function

void debugHelper<K>(
  1. BPlusNode<K> source,
  2. BPlusNode<K> target,
  3. K keyWorkedUpon,
  4. String operation
)

Implementation

void debugHelper<K>(BPlusNode<K> source, BPlusNode<K> target, K keyWorkedUpon, String operation) {
  if (source.node.my_id == 753235 || target.node.my_id == 753235) {
    print(
        """${target.node.my_id == 753235 ? 'Target[${target.node.my_id}] ${target.node.isLeaf ? "is Leaf" : ""}' : 'Source[${source.node.my_id}] ${source.node.isLeaf ? "is Leaf" : ""}'} [$operation] Key[$keyWorkedUpon],  ${target.node.my_id == 753235 ? (target.node.parentCell == null && target.node is LeftMostNode<K> ? "is LMC" : "") : (source.node.parentCell == null && source.node is LeftMostNode<K>? "is LMC" : "")}
        ${target.node.my_id == 753235 ? target: source}"""
    );
  }
}