StringBuilder append long and int: changed ugly ifs to use switch case