| A map whose keys are strings; when a key/value pair is added to the map,
the longest unique abbreviations of that key are added as well, and associated with
the value. Thus:
abbreviations.put( "good", "bye" );
would make it such that you could retrieve the value "bye" from the
map with the keys "good" , "goo" , "go" , and
"g" . A subsequent invocation of:
abbreviations.put( "go", "fish" );
would make it such that you could retrieve the value "bye" using the keys
"good" and "goo" , and the value "fish" with the
key "go" . The key "g" would yield null , since
it would no longer be a unique abbreviation.
The data structure is much like a "trie".
since: 1.0 author: Paul Holser version: $Id: AbbreviationMap.java,v 1.24 2007/04/21 22:25:14 pholser Exp $ See Also: Perl's See Also: Text::Abbrev module |