/** * Recycles a text builder {@link #newInstance() instance} immediately (on the stack when * executing in a {@link _templates.javolution.context.StackContext StackContext}). */ public static void recycle(TextBuilder instance) { FACTORY.recycle(instance); }
/** * Returns a new, preallocated or {@link #recycle recycled} text builder (on the stack when * executing in a {@link _templates.javolution.context.StackContext StackContext}). * * @return a new, preallocated or recycled text builder instance. */ public static TextBuilder newInstance() { TextBuilder textBuilder = (TextBuilder) FACTORY.object(); textBuilder._length = 0; return textBuilder; }