Java Collection Check isCollection(Object obj)

Here you can find the source of isCollection(Object obj)

Description

is Collection

License

Open Source License

Declaration

public static boolean isCollection(Object obj) 

Method Source Code

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

import java.util.Collection;

public class Main {
    public static boolean isCollection(Object obj) {
        if (obj != null && Collection.class.isAssignableFrom(obj.getClass())) {
            return true;
        }/*from   w  w w  .j  a  v a2  s. c  o m*/
        return false;
    }

    public static Class<?> getClass(String type) {
        Class<?> result = null;
        try {
            result = Class.forName(type);
        } catch (Exception e) {
        }
        return result;
    }
}

Related

  1. isCollection(final Object collection)
  2. isCollection(final Object obj)
  3. isCollection(final Object value)
  4. isCollection(Object ob)
  5. isCollection(Object obj)
  6. isCollection(Object obj)
  7. isCollection(Object object)
  8. isCollection(Object object)
  9. isCollection(Object value)