Class MapUtils


  • public final class MapUtils
    extends Object
    Map utilities.
    Author:
    aherscu
    • Method Detail

      • mapOf

        @SafeVarargs
        public static <L,​R> Map<L,​R> mapOf​(org.apache.commons.lang3.tuple.Pair<L,​R>... pairs)
        Creates a map from a list of pairs.
        Type Parameters:
        L - the type of left-side of the pair; this will become the key of the map
        R - the type of right-side of the pair; this will become the value of the map
        Parameters:
        pairs - one ore more pairs; if none, an empty map will be returned
        Returns:
        the map of pairs
        See Also:
        Pair