Here you can find the source of getInteger(Double d)
public static Integer getInteger(Double d)
//package com.java2s; import java.text.DecimalFormat; public class Main { private static DecimalFormat integerFormatter = new DecimalFormat("######0"); public static Integer getInteger(Double d) { if (d == null) { return null; } else {//from w w w . j av a 2 s .c o m return Integer.valueOf(integerFormatter.format(d)); } } }