Here you can find the source of getValueOrDefault(String s, String s1)
public static String getValueOrDefault(String s, String s1)
//package com.java2s; public class Main { public static String getValueOrDefault(String s, String s1) { String result = isEmpty(s).booleanValue() ? s1 : s; return result; }//ww w . j a v a 2s. c o m public static Boolean isEmpty(String s) { boolean flag; if (s == null || s.length() == 0) flag = true; else flag = false; return Boolean.valueOf(flag); } }