Java Collection Check isArrayOrCollection(Object v)

Here you can find the source of isArrayOrCollection(Object v)

Description

is Array Or Collection

License

Open Source License

Declaration

static public boolean isArrayOrCollection(Object v) 

Method Source Code

//package com.java2s;

import java.util.Collection;

public class Main {
    static public boolean isArrayOrCollection(Object v) {
        return v != null
                && (v.getClass().isArray() || v instanceof Collection<?>);
    }/*from w  w w .j  av  a  2  s.  c o m*/

    static public boolean isArray(Object v) {
        return v != null && v.getClass().isArray();
    }
}

Related

  1. isa(Collection> types, Class type)
  2. isACollection(Object input)
  3. isAllFalse(Collection booleans)
  4. isArrayOrCollection(Class clazz)
  5. isArrayOrCollection(Object paramObj)
  6. isArrayOrCollection(String type)
  7. isAssignableFrom(final Collection> classes, final Class objectClass)
  8. isBlank(Collection coll)
  9. isBlank(Collection c)