Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.Collection;

public class Main {

    public static boolean isValid(String src) {
        return !(src == null || "".equals(src.trim()));
    }

    public static boolean isValid(Object obj) {
        return !(null == obj);
    }

    @SuppressWarnings("rawtypes")
    public static boolean isValid(Collection col) {
        return !(col == null || col.isEmpty());
    }

    public static boolean isValid(Object[] arr) {
        return !(arr == null || arr.length == 0);
    }
}