Here you can find the source of longToInteger(long l)
public static Integer longToInteger(long l)
//package com.java2s; //License from project: LGPL public class Main { public static Integer longToInteger(long l) { if (l >= Integer.MIN_VALUE && l <= Integer.MAX_VALUE) { return (int) l; }//from ww w.ja v a 2 s.c o m return null; } }