You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Willi Schönborn <w....@gmail.com> on 2022/08/03 11:34:06 UTC

Trie with non-String keys

I was trying to see whether I could use AbstractPatriciaTrie to create a
trie for non-String keys.
Especially the existence of the KeyAnalyzer type suggested that I could do
this.
But the AbstractPatriciaTrie is package-private and not exposed.
Was that a conscious decision?

Re: Trie with non-String keys

Posted by Matt Sicker <bo...@gmail.com>.
Is this like a sort of composite key that‘s ultimately comparable similar to total ordering on strings?

—
Matt Sicker

> On Aug 15, 2022, at 08:36, Gary Gregory <ga...@gmail.com> wrote:
> 
> Since a trie is traditionally used with strings, this is not surprising to
> me. What kind of key are you wanting to use?
> 
> Gary
> 
>> On Wed, Aug 3, 2022, 08:16 Willi Schönborn <w....@gmail.com> wrote:
>> 
>> I was trying to see whether I could use AbstractPatriciaTrie to create a
>> trie for non-String keys.
>> Especially the existence of the KeyAnalyzer type suggested that I could do
>> this.
>> But the AbstractPatriciaTrie is package-private and not exposed.
>> Was that a conscious decision?
>> 

Re: Trie with non-String keys

Posted by Gary Gregory <ga...@gmail.com>.
Since a trie is traditionally used with strings, this is not surprising to
me. What kind of key are you wanting to use?

Gary

On Wed, Aug 3, 2022, 08:16 Willi Schönborn <w....@gmail.com> wrote:

> I was trying to see whether I could use AbstractPatriciaTrie to create a
> trie for non-String keys.
> Especially the existence of the KeyAnalyzer type suggested that I could do
> this.
> But the AbstractPatriciaTrie is package-private and not exposed.
> Was that a conscious decision?
>