Package com.github.tadukoo.util.map
Class MapUtil
java.lang.Object
com.github.tadukoo.util.map.MapUtil
Util functions for dealing with
Map
s.- Version:
- Alpha v.0.2
- Author:
- Logan Ferree (Tadukoo)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> Map<K, V> Creates a Map (specifically aHashMap
) populated with the given entries.static boolean
Checks if the given Map is blank (either null or an empty map).static boolean
isNotBlank
(Map<?, ?> map) Checks if the given Map is NOT blank (blank = either null or an empty map).
-
Constructor Details
-
MapUtil
private MapUtil()Not allowed to make a MapUtil
-
-
Method Details
-
isBlank
Checks if the given Map is blank (either null or an empty map).- Parameters:
map
- The Map to check- Returns:
- true if the Map is null or empty
-
isNotBlank
Checks if the given Map is NOT blank (blank = either null or an empty map).- Parameters:
map
- The Map to check- Returns:
- true if the Map is not null and not empty
-
createMap
Creates a Map (specifically aHashMap
) populated with the given entries.- Type Parameters:
K
- The key type of the mapV
- The value type of the map- Parameters:
entries
- Key-ValuePair
s to be put in the Map- Returns:
- A newly created map populated with the given entries
-