Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.text.TextUtils;

import java.util.List;

public class Main {
    public static boolean notEmpty(List list) {
        return !isEmpty(list);
    }

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

    public static boolean isEmpty(List list) {
        return list == null || list.isEmpty();
    }

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