Here you can find the source of coalesce(String... vals)
Parameter | Description |
---|
public static String coalesce(String... vals)
//package com.java2s; //License from project: Open Source License public class Main { /**/*w ww .j a v a2 s .c om*/ * Returns the first non-null value in the arguments. * @param vals: values to check.. * @return : first non-null. */ public static String coalesce(String... vals) { for (String str : vals) { if (str != null) return str; } return null; } }