code: public static <K, V> Map<K, V> map(Object... keysAndValues) {
          if (keysAndValues.length % 2 != 0) { throw new IllegalArgumentException("number of arguments must be even"); }
  
          Map<K, V> map = new HashMap<K, V>(Math.max(keysAndValues.length, 16));
          for (int i = 0; i < keysAndValues.length;) {
              map.put((K) keysAndValues[i++], (V) keysAndValues[i++]);
          }
          return map;
      }
docs: Create a map from keys and values.
  
  @param keysAndValues list of key value pairs. The number of items must be even.
  The argument at index 0 is a key of the value at index 1, argument at index 2 is key of value at index 3, and so on.
  @return Map filled with keys and values.