Here you can find the source of toInt(T value)
public static <T extends Number> int toInt(T value)
//package com.java2s; //License from project: Open Source License public class Main { public static <T extends Number> int toInt(T value) { return Integer.parseInt(String.valueOf(value)); }//from w w w . j a v a 2s. c o m }