Java String Empty emptyString(Object s)

Here you can find the source of emptyString(Object s)

Description

*

License

Apache License

Parameter

Parameter Description
s An input Object, expected to be a String.

Return

true if s == null or s is an empty String, else false.

Declaration

public static boolean emptyString(Object s) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /** ***************************************************************
     * @param s An input Object, expected to be a String.
     * @return true if s == null or s is an empty String, else false.
     *//*from   w w w  . ja v  a 2 s .  co m*/
    public static boolean emptyString(Object s) {

        return ((s == null) || ((s instanceof String) && s.equals("")));
    }
}

Related

  1. coerceValueIfNullOrEmpty(String s, String valueIfNullOrEmpty)
  2. emptyString()
  3. emptyString(final String a, final String defaultString)
  4. emptyString(final String string)
  5. emptyString(String s)
  6. emptyString(String s)
  7. emptyString(String str)
  8. emptyString(String str)