public static int getSize(final Object iObject) {
    if (iObject == null)
      return 0;

    if (!isMultiValue(iObject))
      return 0;

    if (iObject instanceof Collection<?>)
      return ((Collection<Object>) iObject).size();
    if (iObject instanceof Map<?, ?>)
      return ((Map<?, Object>) iObject).size();
    if (iObject.getClass().isArray())
      return Array.getLength(iObject);
    return 0;
  }
public static int getSize ( final Object iObject ) { if ( iObject == null ) return 0 ; if ( ! isMultiValue ( iObject ) ) return 0 ; if ( iObject instanceof Collection < ? > ) return ( ( Collection < Object > ) iObject ) . size ( ) ; if ( iObject instanceof Map < ? , ? > ) return ( ( Map < ? , Object > ) iObject ) . size ( ) ; if ( iObject . getClass ( ) . isArray ( ) ) return Array . getLength ( iObject ) ; return 0 ; }
Returns the size of the multi-value object

@param iObject
Multi-value object (array, collection or map)
@return the size of the multi value object