Provides fundamental classes and interfaces; some of which are either missing from the java.lang package or are not available for all platforms (including J2ME CLDC).

For applications targetting the J2SE 5.0+ run-time (ant 1.5), the Appendable and Enum classes are replaced with the java.lang equivalent.

FAQ:

  1. I'm accumulating a large string, and all I want to do is append to the end of the current string, which is the better class to use, Text or TextBuilder? Bearing in mind that speed is important, but I also want to conserve memory.

    It all depends of the size of the text to append (the actual size of the document being appended has almost no impact in both cases).

    If you append one character at a time or a small text then {@link javolution.lang.TextBuilder#append(Object) TextBuilder.append(Object)} is faster (the cost of copying the characters to the internal buffer is then negligeable and TextBuilder never resizes its internal arrays).

    If you append larger character sequences (the threshold might be around 20 characters) then {@link javolution.lang.Text#concat(Text) Text.concat(Text)} is more efficient (it avoid character copies, but creates small nodes objects instead).