Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.List;
import java.util.Map;
import java.util.Set;

public class Main {
    public static boolean isCollectionOrMap(Class type) {
        if (List.class.isAssignableFrom(type) || Set.class.isAssignableFrom(type)
                || Map.class.isAssignableFrom(type) || type.isArray()) {
            return true;
        }
        return false;
    }
}