fix: add Has method for a `BTreeG[Item]`
diff --git a/btree_generic.go b/btree_generic.go
index ccf17b4..e44a0f4 100644
--- a/btree_generic.go
+++ b/btree_generic.go
@@ -990,6 +990,11 @@
return i
}
+// Has returns true if the given key is in the tree.
+func (t *BTree) Has(key Item) bool {
+ return (*BTreeG[Item])(t).Has(key)
+}
+
// ReplaceOrInsert adds the given item to the tree. If an item in the tree
// already equals the given one, it is removed from the tree and returned.
// Otherwise, nil is returned.