public static <T extends Enum<?>> T enumForName(Class<T> enumClass, Object object) {
    String name = (nonNull(object)) ? object.toString() : null;
    for (T enumItem : enumClass.getEnumConstants()) {
      if (enumItem.name().equalsIgnoreCase(name) || enumItem.toString().equalsIgnoreCase(name)) {
        return enumItem;
      }
    }
    return null;
  }
Copy entire map of string collection.

<p>The copy is unmodifiable map of unmodifiable collections.

@param map string collection map
@return copy of the map or an empty map if the map is null.
core/src/main/java/feign/Util.java