Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.util.Collection;
import java.util.Map;

public class Main {
    public static boolean isValid(Collection<?> coll) {
        return coll != null && !coll.isEmpty();
    }

    public static boolean isValid(Map<?, ?> map) {
        return map != null && !map.isEmpty();
    }

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