org.mentalog.util
Class StringBuilderUtils

java.lang.Object
  extended by org.mentalog.util.StringBuilderUtils

public class StringBuilderUtils
extends Object

This code is NOT thread-safe at all. You can use to_sb to bypass autoboxing and avoid the object creation. So intead of: Info.log(myInteger); you would do: Info.log(to_sb(myInteger)); NOTE: If you want to use this from multiple threads you MUST synchronize around to_sb: synchronized(Info) { Info.log(to_sb(myInteger)); }

Author:
Sergio Oliveira Jr.

Constructor Summary
StringBuilderUtils()
           
 
Method Summary
static int getPointer()
           
static void reset()
           
static StringBuilder to_sb(boolean x)
           
static StringBuilder to_sb(byte x)
           
static StringBuilder to_sb(char x)
           
static StringBuilder to_sb(double x)
           
static StringBuilder to_sb(float x)
           
static StringBuilder to_sb(int x)
           
static StringBuilder to_sb(long x)
           
static StringBuilder to_sb(short x)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringBuilderUtils

public StringBuilderUtils()
Method Detail

to_sb

public static final StringBuilder to_sb(int x)

to_sb

public static final StringBuilder to_sb(float x)

to_sb

public static final StringBuilder to_sb(short x)

to_sb

public static final StringBuilder to_sb(byte x)

to_sb

public static final StringBuilder to_sb(char x)

to_sb

public static final StringBuilder to_sb(boolean x)

to_sb

public static final StringBuilder to_sb(long x)

to_sb

public static final StringBuilder to_sb(double x)

reset

public static final void reset()

getPointer

public static final int getPointer()


Copyright © 2013. All Rights Reserved.