Java Collection Check isCollection(final Object obj)

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

Description

is Collection

License

Open Source License

Declaration

public static boolean isCollection(final 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(final Object obj) {
        return isInstanceof(obj, Collection.class);
    }//from  w ww .j  av  a2  s.c om

    public static boolean isInstanceof(final Object obj, final Class<?> cls) {
        return cls.isInstance(obj);
    }
}

Related

  1. isCollection(Class klass)
  2. isCollection(Class type)
  3. isCollection(Class clazz)
  4. isCollection(Class fieldClass)
  5. isCollection(final Object collection)
  6. isCollection(final Object value)
  7. isCollection(Object ob)
  8. isCollection(Object obj)
  9. isCollection(Object obj)