Here you can find the source of sumIf(final Integer number, final Integer sum, final Boolean condition)
public static int sumIf(final Integer number, final Integer sum, final Boolean condition)
//package com.java2s; //License from project: Apache License public class Main { public static int sumIf(final Integer number, final Integer sum, final Boolean condition) { int result = number != null ? number : 0; if (Boolean.TRUE.equals(condition) && sum != null) { result += sum;/*from w w w . j a v a 2s. c o m*/ } return result; } }