Android CharSequence Empty Check isEmpty(CharSequence text)

Here you can find the source of isEmpty(CharSequence text)

Description

is Empty

Declaration

public static boolean isEmpty(CharSequence text) 

Method Source Code

//package com.java2s;

public class Main {
    public static boolean isEmpty(String string) {
        if (string == null) {
            return true;
        }/*  w  w  w . ja v  a2 s. c  om*/
        if ("".equals(string)) {
            return true;
        }
        return false;
    }

    public static boolean isEmpty(CharSequence text) {
        if (text != null)
            return isEmpty(text.toString());
        return true;
    }
}

Related

  1. isNotEmpty(final CharSequence cs)
  2. isEmpty(final CharSequence cs)
  3. isEmpty(CharSequence arg)