Maybe it's worth looking into the design of this trie library which works
great in my projects?
https://github.com/ClickerMonkey/TrieHard

There is a TrieSequencer<S> interface which must be implemented for the
keys.


On Thu, Sep 1, 2022 at 1:16 AM Willi Schönborn <[email protected]>
wrote:

> Yes, exactly. To be precise, I'm trying to use Kotlin data classes as keys,
> which are similar to Java records. They have ordered components and I'd
> require those components to be comparable.
>
> On 2022/08/15 20:03:00 Matt Sicker wrote:
> > 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 <[email protected]> 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 <[email protected]> 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?
> > >>
> >
>


-- 
Axel Kramer

Reply via email to