code: public static <K, V, T> Map<K, V> toMap(T[] entryArray) throws IllegalArgumentException {
      if (entryArray == null) {
        return com.google.common.collect.Maps.<K, V>newHashMap();
      }
      return toMap(Arrays.asList(entryArray));
    }
docs: Generates a map from an array an entries. Entries are defined in the API
  as a class which consists of a {@code key} and {@code value} with a name
  typically in the form of {@code Key_ValueMapEntry}, represented here as
  {@code T}. The generated map must have same type {@code K} as the {@code
  key} within {@code Key_ValueMapEntry}. The same applies for {@code V} and
  {@code value} within {@code Key_ValueMapEntry}. If
  {@code entryArray == null}, an emtpy map is returned.
  
  @param <K> the type of the entry key
  @param <V> the type of the entry value
  @param <T> the map entry type
  @param entryArray the array of entries constituting a map as represented in
  the API
  @return a map of type {@code K} and {@code V} representing the entry array
  @throws IllegalArgumentException if {@code entryArray} is not compatible
  with {@code Map<K, V>}.