work/workmanager/src/main/java/androidx/work/Data.java
public @NonNull Builder putAll(@NonNull Map<String, Object> values) {
            for (Map.Entry<String, Object> entry : values.entrySet()) {
                String key = entry.getKey();
                Object value = entry.getValue();
                if (value == null) {
                    mValues.put(key, null);
                    continue;
                }
                Class valueType = value.getClass();
                if (valueType == Boolean.class
                        || valueType == Integer.class
                        || valueType == Long.class
                        || valueType == Float.class
                        || valueType == Double.class
                        || valueType == String.class
                        || valueType == Boolean[].class
                        || valueType == Integer[].class
                        || valueType == Long[].class
                        || valueType == Float[].class
                        || valueType == Double[].class
                        || valueType == String[].class) {
                    mValues.put(key, value);
                } else if (valueType == boolean[].class) {
                    mValues.put(key, convertPrimitiveBooleanArray((boolean[]) value));
                } else if (valueType == int[].class) {
                    mValues.put(key, convertPrimitiveIntArray((int[]) value));
                } else if (valueType == long[].class) {
                    mValues.put(key, convertPrimitiveLongArray((long[]) value));
                } else if (valueType == float[].class) {
                    mValues.put(key, convertPrimitiveFloatArray((float[]) value));
                } else if (valueType == double[].class) {
                    mValues.put(key, convertPrimitiveDoubleArray((double[]) value));
                } else {
                    throw new IllegalArgumentException(
                            String.format("Key %s has invalid type %s", key, valueType));
                }
            }
            return this;
        }
/**
         * Puts all input key-value pairs into the Builder. Valid types are: Boolean, Integer,
         * Long, Float, Double, String, and array versions of each of those types.
         * Invalid types throw an {@link IllegalArgumentException}.
         *
         * @param values A {@link Map} of key-value pairs to add
         * @return The {@link Builder}
         */
Puts all input key-value pairs into the Builder. Valid types are: Boolean, Integer,
Long, Float, Double, String, and array versions of each of those types.
Invalid types throw an  IllegalArgumentException.

@param values A  Map of key-value pairs to add
@return The  Builder
Puts all input key - value pairs into the Builder . Valid types are : Boolean Integer Long Float Double String and array versions of each of those types . Invalid types throw an IllegalArgumentException . @param values A Map of key - value pairs to add @return The Builder
public @NonNull Builder putAll(@NonNull Map<String, Object> values) {
            for (Map.Entry<String, Object> entry : values.entrySet()) {
                String key = entry.getKey();
                Object value = entry.getValue();
                if (value == null) {
                    mValues.put(key, null);
                    continue;
                }
                Class valueType = value.getClass();
                if (valueType == Boolean.class
                        || valueType == Integer.class
                        || valueType == Long.class
                        || valueType == Float.class
                        || valueType == Double.class
                        || valueType == String.class
                        || valueType == Boolean[].class
                        || valueType == Integer[].class
                        || valueType == Long[].class
                        || valueType == Float[].class
                        || valueType == Double[].class
                        || valueType == String[].class) {
                    mValues.put(key, value);
                } else if (valueType == boolean[].class) {
                    mValues.put(key, convertPrimitiveBooleanArray((boolean[]) value));
                } else if (valueType == int[].class) {
                    mValues.put(key, convertPrimitiveIntArray((int[]) value));
                } else if (valueType == long[].class) {
                    mValues.put(key, convertPrimitiveLongArray((long[]) value));
                } else if (valueType == float[].class) {
                    mValues.put(key, convertPrimitiveFloatArray((float[]) value));
                } else if (valueType == double[].class) {
                    mValues.put(key, convertPrimitiveDoubleArray((double[]) value));
                } else {
                    throw new IllegalArgumentException(
                            String.format("Key %s has invalid type %s", key, valueType));
                }
            }
            return this;
        }
public @ NonNull Builder putAll ( @ NonNull Map < String , Object > values ) { for ( Map . Entry < String , Object > entry : values . entrySet ( ) ) { String key = entry . getKey ( ) ; Object value = entry . getValue ( ) ; if ( value == null ) { mValues . put ( key , null ) ; continue ; } Class valueType = value . getClass ( ) ; if ( valueType == Boolean . class || valueType == Integer . class || valueType == Long . class || valueType == Float . class || valueType == Double . class || valueType == String . class || valueType == Boolean [ ] . class || valueType == Integer [ ] . class || valueType == Long [ ] . class || valueType == Float [ ] . class || valueType == Double [ ] . class || valueType == String [ ] . class ) { mValues . put ( key , value ) ; } else if ( valueType == boolean [ ] . class ) { mValues . put ( key , convertPrimitiveBooleanArray ( ( boolean [ ] ) value ) ) ; } else if ( valueType == int [ ] . class ) { mValues . put ( key , convertPrimitiveIntArray ( ( int [ ] ) value ) ) ; } else if ( valueType == long [ ] . class ) { mValues . put ( key , convertPrimitiveLongArray ( ( long [ ] ) value ) ) ; } else if ( valueType == float [ ] . class ) { mValues . put ( key , convertPrimitiveFloatArray ( ( float [ ] ) value ) ) ; } else if ( valueType == double [ ] . class ) { mValues . put ( key , convertPrimitiveDoubleArray ( ( double [ ] ) value ) ) ; } else { throw new IllegalArgumentException ( String . format ( "Key %s has invalid type %s" , key , valueType ) ) ; } } return this ; }
Puts all input key-value pairs into the Builder.
Puts all input key - value pairs into the Builder .