Here you can find the source of doubleToInteger(Double num)
public static Integer doubleToInteger(Double num)
//package com.java2s; public class Main { public static Integer doubleToInteger(Double num) { return Math.round(Math.round(num)); }/*from w w w . j a v a2 s. c o m*/ }