Here you can find the source of emptyString(final String a, final String defaultString)
public static String emptyString(final String a, final String defaultString)
//package com.java2s; //License from project: Apache License public class Main { public static String emptyString(final String a, final String defaultString) { return a != null && a.length() > 0 ? a : defaultString; }// www .j a va 2s. co m }