Package uk.ac.gda.util.map
Class MapUtils
java.lang.Object
uk.ac.gda.util.map.MapUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateLinkedMap(String[] list1, String[] list2) Like createMap(...) but uses a LinkedHashMap to maintian the items in the same order as they are in list1.Create a map from the two list of strings.static Stringstatic voidstatic <V> voidputAllUniqueStrings(Map<String, V> data, Map<String, V> add) Adds the map add into data but generates unique keysstatic <V> void
-
Constructor Details
-
MapUtils
public MapUtils()
-
-
Method Details
-
createMap
Create a map from the two list of strings.- Parameters:
list1-list2-- Returns:
- Map
-
createLinkedMap
Like createMap(...) but uses a LinkedHashMap to maintian the items in the same order as they are in list1.- Parameters:
list1-list2-- Returns:
- ordered map.
-
putAllUniqueStrings
Adds the map add into data but generates unique keys- Parameters:
data-add-
-
putUnique
- Parameters:
data-key-value-
-
getString
- Parameters:
value-- Returns:
- v
-
getMap
- Parameters:
value-- Returns:
- v
-
main
-