添加了树的接口
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
package avlkey
|
||||
|
||||
import (
|
||||
"github.com/474420502/focus/compare"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"github.com/474420502/focus/tree"
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
@@ -35,6 +37,10 @@ func New(Compare compare.Compare) *Tree {
|
||||
return &Tree{Compare: Compare, iter: NewIteratorWithCap(nil, 16)}
|
||||
}
|
||||
|
||||
func assertImplementation() {
|
||||
var _ tree.IBSTreeKey = (*Tree)(nil)
|
||||
}
|
||||
|
||||
func (tree *Tree) String() string {
|
||||
if tree.size == 0 {
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user