Java Collection Check isCollectionType(Object obj)

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

Description

is Collection Type

License

Apache License

Declaration

public static boolean isCollectionType(Object obj) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {
    public static boolean isCollectionType(Object obj) {
        return (obj.getClass().isArray() || (obj instanceof Collection) || (obj instanceof Hashtable)
                || (obj instanceof HashMap) || (obj instanceof HashSet) || (obj instanceof List)
                || (obj instanceof AbstractMap));
    }// w ww.j  a  v  a  2s.c  o m
}

Related

  1. isCollectionType(Class type)
  2. isCollectionType(Class cls)
  3. isCollectionType(Class cls)
  4. isCollectionType(Class type)
  5. isCollectionType(final Class cls)
  6. isCollectionType(Object obj)
  7. isCollectionType(Object propertyValue)
  8. isCollectionType(Object value)
  9. isCollectionTypeHomogenous(final Collection collection, final Class expectedType)