Exemple #1
0
func (t *rdfzPrefixTable) Add(base string) (id uint) {
	id = t.Count
	t.Count++
	t.Tree = t.Tree.Insert(splaytree.NewHashKey(base), id)

	return id
}
Exemple #2
0
func (t *rdfzPrefixTable) Lookup(base string) (id uint, ok bool) {
	i, ok := t.Tree.Search(splaytree.NewHashKey(base))
	if ok {
		return i.(uint), true
	}

	return 0, false
}