public class TreeStringBuilder extends ObjectBuilds
TreeStrings that share common prefixes. Call
intern(String)and you get the
TreeStringthat represents the same string, but as you interns more strings that share the same prefixes, those
TreeStrings that you get back start to share data.
Because the internal state of
TreeStrings get mutated as new strings are interned (to exploit new-found common prefixes),
TreeStrings returned from
intern(String)aren't thread-safe until
TreeStringBuilderis disposed. That is, you have to make sure other threads don't see those
TreeStrings until you are done interning strings.
- Kohsuke Kawaguchi
Constructors Constructor Description
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
dedup()Further reduces the memory footprint by finding the same labels across multiple
intern(String s)Interns a string.
intern(TreeString s)Interns a