private static boolean isArrayLike ( Object object ) { return object != null && ( object . getClass ( ) . isArray ( ) || object instanceof Collection ) ; }
An object is array like if is an actual array or a collection .