Here you can find the source of zeroIfNull(Integer i)
public static int zeroIfNull(Integer i)
//package com.java2s; public class Main { public static int zeroIfNull(Integer i) { return i != null ? i.intValue() : 0; }// w w w . ja v a2s. co m public static long zeroIfNull(Long l) { return l != null ? l.longValue() : 0; } }