/** * Adds all the elements from the specified Map. * @param map The Map to add. */ public void putAll(final Map<String, String> map) { for (final Map.Entry<String, String> entry : map.entrySet()) { data.putValue(entry.getKey(), entry.getValue()); } }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. */ public void put(final String key, final String value) { if (value == null) { throw new IllegalArgumentException("No value provided for key " + key); } validate(key, value); data.putValue(key, value); }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. * @return this object * @since 2.9 */ @SuppressWarnings("unchecked") public M with(final String key, final byte value) { validate(key, value); data.putValue(key, value); return (M) this; }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. * @return this object * @since 2.9 */ @SuppressWarnings("unchecked") public M with(final String key, final boolean value) { validate(key, value); data.putValue(key, value); return (M) this; }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. * @return this object * @since 2.9 */ @SuppressWarnings("unchecked") public M with(final String key, final char value) { validate(key, value); data.putValue(key, value); return (M) this; }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. * @return this object * @since 2.9 */ @SuppressWarnings("unchecked") public M with(final String key, final double value) { validate(key, value); data.putValue(key, value); return (M) this; }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. * @return this object * @since 2.9 */ @SuppressWarnings("unchecked") public M with(final String key, final float value) { validate(key, value); data.putValue(key, value); return (M) this; }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. * @return this object * @since 2.9 */ @SuppressWarnings("unchecked") public M with(final String key, final Object value) { validate(key, value); data.putValue(key, value); return (M) this; }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. * @return this object * @since 2.9 */ @SuppressWarnings("unchecked") public M with(final String key, final int value) { validate(key, value); data.putValue(key, value); return (M) this; }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. * @return this object * @since 2.9 */ @SuppressWarnings("unchecked") public M with(final String key, final short value) { validate(key, value); data.putValue(key, value); return (M) this; }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. * @return this object * @since 2.9 */ @SuppressWarnings("unchecked") public M with(final String key, final long value) { validate(key, value); data.putValue(key, value); return (M) this; }
/** * Adds all the elements from the specified Map. * @param map The Map to add. */ public void putAll(final Map<String, String> map) { for (final Map.Entry<String, ?> entry : map.entrySet()) { data.putValue(entry.getKey(), entry.getValue()); } }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. */ public void put(final String key, final String value) { if (value == null) { throw new IllegalArgumentException("No value provided for key " + key); } validate(key, value); data.putValue(key, value); }
protected MapFilter(final Map<String, List<String>> map, final boolean oper, final Result onMatch, final Result onMismatch) { super(onMatch, onMismatch); this.isAnd = oper; Objects.requireNonNull(map, "map cannot be null"); this.map = new SortedArrayStringMap(map.size()); for (final Map.Entry<String, List<String>> entry : map.entrySet()) { this.map.putValue(entry.getKey(), entry.getValue()); } }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. * @return this object * @since 2.9 */ @SuppressWarnings("unchecked") public M with(final String key, final double value) { validate(key, value); data.putValue(key, value); return (M) this; }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. * @return this object * @since 2.9 */ @SuppressWarnings("unchecked") public M with(final String key, final float value) { validate(key, value); data.putValue(key, value); return (M) this; }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. * @return this object * @since 2.9 */ @SuppressWarnings("unchecked") public M with(final String key, final long value) { validate(key, value); data.putValue(key, value); return (M) this; }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. * @return this object * @since 2.9 */ @SuppressWarnings("unchecked") public M with(final String key, final short value) { validate(key, value); data.putValue(key, value); return (M) this; }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. * @return this object * @since 2.9 */ @SuppressWarnings("unchecked") public M with(final String key, final byte value) { validate(key, value); data.putValue(key, value); return (M) this; }
/** * Adds an item to the data Map. * @param key The name of the data item. * @param value The value of the data item. * @return this object * @since 2.9 */ @SuppressWarnings("unchecked") public M with(final String key, final char value) { validate(key, value); data.putValue(key, value); return (M) this; }