tsaloranta
unread,Dec 14, 2010, 3:06:44 PM12/14/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ning-tr13-users
Ok after having had to re-read code I wrote earlier (thanks Brian!), I
realized that builder API was a complete mess. This was due to
incomplete refactoring when adding ability to create both byte[] and
VInt valued tries; some code was still assuming values are always
Strings (with conversions to/from byte[]).
Anyway: I ended up adding "KeyValueSource" interface which is the
minimal thing needed for building tries, and is extended by
KeyValueReader (existing class) that does so from a textual stream-
based source (like File).
While building process could still use some more cleanup, at least it
should make some sense now.
Main usage examples can be found from unit tests; for example, src/
test/java/com/ning/tr13/read has "BytesTrieLookupTest" which shows
basic build process from a text file.
-+ Tatu +-