Java String Empty emptyString(final String a, final String defaultString)

Here you can find the source of emptyString(final String a, final String defaultString)

Description

empty String

License

Apache License

Declaration

public static String emptyString(final String a, final String defaultString) 

Method Source Code

//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
}

Related

  1. coerceValueIfNullOrEmpty(String s, String valueIfNullOrEmpty)
  2. emptyString()
  3. emptyString(final String string)
  4. emptyString(Object s)
  5. emptyString(String s)
  6. emptyString(String s)