maps.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static <K, V> Map | |
| public static <K, V> void | forEach(Map<K, V>
the map. May not be map, Procedures.null.the procedure. May not be procedurenull.Applies the given |
| public static <K, V> void | forEach(Map<K, V>
the map. May not be map, Procedures.null.the procedure. May not be procedurenull.Applies the given |
| public static <K, V1, V2> Map | Returns: a map with equal keys but transformed values. Nevernull.the original map. May not be original, Functions.null.the transformation. May not be transformationnull.Returns a map that performs the given |
| public static < type of the map keys. K, type of the map values. V> V | Returns: the value previously associated to the key, ornull
if the key was not present in the map before the addition.the map to update. map, Pair<? extends K, ? extends V> the entry (key, value) to add into the map. entry)Add the given pair into the map. |
| public static < type of the map keys. K, type of the map values. V> void | operator_add(Map<K, V>
the map to update. outputMap, Map<? extends K, ? extends V> the entries to add. inputMap)Add the given entries of the input map into the output map. |
| public static < type of the map keys. K, type of the map values. V> Map | Returns: an immutable map with the content of the map and with the given entry.the map to consider. left, final Pair<? extends K, ? extends V> the entry (key, value) to remove from the map. right)Remove the given pair from a given map for obtaining a new map. |
| public static < type of the map keys. K, type of the map values. V> Map | Returns: the map with the content of the map except the key.the map to update. map, final K the key to remove. key)Replies the elements of the given map except the pair with the given key. |
| public static < type of the map keys. K, type of the map values. V> Map | Returns: the map with the content of the left map except the pairs of the right map.the map to update. left, final Map<? extends K, ? extends V> the pairs to remove. right)Replies the elements of the left map without the pairs in the right map. |
| public static < type of the map keys. K, type of the map values. V> Map | Returns: the map with the content of the map except the pairs.the map to update. map, final Iterable<?> the keys of the pairs to remove. keys)Replies the elements of the given map except the pairs with the given keys. |
| public static < type of the map keys. K, type of the map values. V> Map | Returns: an immutable map with the content of the map and with the given entry.the map to consider. left, final Pair<? extends K, ? extends V> the entry (key, value) to add into the map. right)Add the given pair to a given map for obtaining a new map. |
| public static < type of the map keys. K, type of the map values. V> Map | Returns: a map with the merged contents from the two maps.the left map. left, Map<? extends K, ? extends V> the right map. right)Merge the two maps. |
| public static < type of the map keys. K, type of the map values. V> V | Returns: the removed value, ornull if the key was not
present in the map.the map to update. map, K the key to remove. key)Remove a key from the given map. |
| public static < type of the map keys. K, type of the map values. V> boolean | Returns: true if the pair was removed.the map to update. map, Pair<? extends K, ? extends V> the entry (key, value) to remove from the map. entry)Remove the given pair into the map. |
| public static < type of the map keys. K, type of the map values. V> void | operator_remove(Map<K, V>
the map to update. map, Iterable<? super K> the keys of the pairs to remove. keysToRemove)Remove pairs with the given keys from the map. |
| public static < type of the map keys. K, type of the map values. V> Map |
| MapExtensions | back to summary |
|---|---|
| public MapExtensions() | |
| filter | back to summary |
|---|---|
| public static <K, V> Map Returns a filtered live view on top of the original map. Changes to one affect the other. The mapping is done lazily. That is, subsequent access of the values in the map will repeatedly apply the transformation. Characteristics of the original map, such as iteration order, are left intact. Changes in the original map are reflected in the result map. The results supports removal if the original map supports removal. | |
| forEach | back to summary |
|---|---|
| public static <K, V> void forEach(Map<K, V> map, Procedures. Applies the given
| |
| forEach | back to summary |
|---|---|
| public static <K, V> void forEach(Map<K, V> map, Procedures. Applies the given
| |
| mapValues | back to summary |
|---|---|
| public static <K, V1, V2> Map Returns a map that performs the given The mapping is done lazily. That is, subsequent access of the values in the map will repeatedly apply the transformation. Characteristics of the original map, such as iteration order, are left intact. Changes in the original map are reflected in the result map. The results supports removal if the original map supports removal. | |
| operator_add | back to summary |
|---|---|
| public static <K, V> V operator_add(Map<K, V> map, Pair<? extends K, ? extends V> entry) Add the given pair into the map. If the pair key already exists in the map, its value is replaced by the value in the pair, and the old value in the map is returned.
| |
| operator_add | back to summary |
|---|---|
| public static <K, V> void operator_add(Map<K, V> outputMap, Map<? extends K, ? extends V> inputMap) Add the given entries of the input map into the output map. If a key in the inputMap already exists in the outputMap, its value is replaced in the outputMap by the value from the inputMap. | |
| operator_minus | back to summary |
|---|---|
| public static <K, V> Map Remove the given pair from a given map for obtaining a new map. If the given key is inside the map, but is not mapped to the given value, the map will not be changed. The replied map is a view on the given map. It means that any change in the original map is reflected to the result of this operation.
| |
| operator_minus | back to summary |
|---|---|
| public static <K, V> Map Replies the elements of the given map except the pair with the given key. The replied map is a view on the given map. It means that any change in the original map is reflected to the result of this operation. | |
| operator_minus | back to summary |
|---|---|
| public static <K, V> Map Replies the elements of the left map without the pairs in the right map. If the pair's values differ from the value within the map, the map entry is not removed. The difference is an immutable snapshot of the state of the maps at the time this method is called. It will never change, even if the maps change at a later time.
Since this method uses | |
| operator_minus | back to summary |
|---|---|
| public static <K, V> Map Replies the elements of the given map except the pairs with the given keys. The replied map is a view on the given map. It means that any change in the original map is reflected to the result of this operation. | |
| operator_plus | back to summary |
|---|---|
| public static <K, V> Map Add the given pair to a given map for obtaining a new map. The replied map is a view on the given map. It means that any change in the original map is reflected to the result of this operation. Even if the key of the right operand exists in the left operand, the value in the right operand is preferred.
| |
| operator_plus | back to summary |
|---|---|
| public static <K, V> Map Merge the two maps. The replied map is a view on the given map. It means that any change in the original map is reflected to the result of this operation. If a key exists in the left and right operands, the value in the right operand is preferred.
| |
| operator_remove | back to summary |
|---|---|
| public static <K, V> V operator_remove(Map<K, V> map, K key) Remove a key from the given map. | |
| operator_remove | back to summary |
|---|---|
| public static <K, V> boolean operator_remove(Map<K, V> map, Pair<? extends K, ? extends V> entry) Remove the given pair into the map. If the given key is inside the map, but is not mapped to the given value, the map will not be changed.
| |
| operator_remove | back to summary |
|---|---|
| public static <K, V> void operator_remove(Map<K, V> map, Iterable<? super K> keysToRemove) Remove pairs with the given keys from the map. | |
| union | back to summary |
|---|---|
| public static <K, V> Map Merge the given maps. The replied map is a view on the given two maps. If a key exists in the two maps, the replied value is the value of the right operand. Even if the key of the right operand exists in the left operand, the value in the right operand is preferred. The replied map is unmodifiable.
| |