private static boolean functionsAreAllowed(boolean isAddAllFunction,boolean isPutAllFunction,Class<?> classD,Class<?> classS){
  if (isAddAllFunction)   return collectionIsAssignableFrom(classD) && collectionIsAssignableFrom(classS);
  if (isPutAllFunction)   return mapIsAssignableFrom(classD) && mapIsAssignableFrom(classS);
  return isAssignableFrom(classD,classS);
}

private static boolean functionsAreAllowed ( boolean isAddAllFunction , boolean isPutAllFunction , Class < ? > classD , Class < ? > classS ) { if ( isAddAllFunction ) return collectionIsAssignableFrom ( classD ) && collectionIsAssignableFrom ( classS ) ; if ( isPutAllFunction ) return mapIsAssignableFrom ( classD ) && mapIsAssignableFrom ( classS ) ; return isAssignableFrom ( classD , classS ) ; }
returns true if the function to check is allowed .
