public final class MapUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static |
equals(Map
Checks if two maps are equal: the are of the same types and has equal number of stored entries and both has the same set of keys ans each key is associated with an appropriate value.
|
static |
getHashCode(Map
Calculates the hash code of the map.
|
static |
merge(Map
Merges data from source Map into destination Map using provided function if key exists in both Maps.
|
static |
putIfNotNull(Map
Puts value to map if the value is not null.
|
public staticboolean equals(Map m1, Map m2)
maps are equal: the are of the same types and has equal number of stored entries and both has the same set of keys ans each key is associated with an appropriate value.
K - is a type of keys
V - is a type of values
m1 - is the first map
m2 - is the second map
true if maps are equal and false otherwise
public staticvoid merge(Map destination, Map source, BiFunction valuesMerger)
K - is a type of keys
V - is a type of values
destination - Map to which data will be merged.
source - Map from which data will be taken.
valuesMerger - function which will be used to merge Maps values.
public staticint getHashCode(Map m1)
map.
K - is a type of keys
V - is a type of values
m1 - is the map
map.
public staticvoid putIfNotNull(Map map, K key, V value)
K - is a type of key
V - is a type of value
map - the map in which value can be pushed
key - the key
value - the value
Copyright © 1998–2022 iText Group NV. All rights reserved.