Example usage for java.lang String isEmpty

List of usage examples for java.lang String isEmpty

Introduction

In this page you can find the example usage for java.lang String isEmpty.

Prototype

public boolean isEmpty() 

Source Link

Document

Returns true if, and only if, #length() is 0 .

Usage

From source file:Main.java

public static boolean isEmpty(String str) {
    return str == null || str.isEmpty() || str.length() == 0;
}

From source file:Main.java

public static boolean isNull(String str) {
    return str == null || str.isEmpty();
}

From source file:Main.java

public static boolean isEmpty(String str) {
    return str == null || str.isEmpty();
}

From source file:Main.java

public static boolean IsNullOrEmpty(String str) {
    if (str == null || str.isEmpty())
        return true;
    return false;
}

From source file:Main.java

static Boolean isBlank(String str) {
    return str == null || str.isEmpty();
}

From source file:Main.java

public static boolean isValidString(String s) {
    return !(s == null || s.isEmpty());
}

From source file:Main.java

public static boolean notEmpty(String string) {
    return !string.isEmpty();
}

From source file:Main.java

public static boolean isNotEmpty(String s) {
    return (s != null) && !s.isEmpty();
}

From source file:Main.java

public static String capitalize(String line) {
    if (line.isEmpty()) {
        return "";
    }/*from  www  .ja v  a2s .c o  m*/

    String retString = Character.toUpperCase(line.charAt(0)) + "";

    if (line.length() > 1) {
        retString = retString + line.substring(1);
    }

    return retString;
}

From source file:Main.java

protected static double mGetDoubleValueOf(String pVal) {
    if (pVal == null || pVal.isEmpty())
        return 0;
    return Double.valueOf(pVal);
}