Here you can find the source of numberToString(Object instance)
private static String numberToString(Object instance)
//package com.java2s; //License from project: LGPL public class Main { private static String numberToString(Object instance) { String s = instance.toString(); int i = s.lastIndexOf("."); if (i == -1) { return s; }/* w w w . j a va 2s. c o m*/ String result = s.substring(0, i); return result; } }