Here you can find the source of coalesce(T a, T b)
Parameter | Description |
---|---|
a | a parameter |
b | a parameter |
T | a parameter |
public static <T> T coalesce(T a, T b)
//package com.java2s; //License from project: Apache License public class Main { /**/*from www . j av a 2 s . c o m*/ * Return the first not null objects in the list of arguments * @param a * @param b * @param <T> * @return object */ public static <T> T coalesce(T a, T b) { return a == null ? b : a; } }