/** * Converts the passed list of inners to unmodifiable map of impls. * @param innerList list of the inners. * @return map of the impls */ public Map<String, ImplT> convertToUnmodifiableMap(List<InnerT> innerList) { Map<String, ImplT> result = new HashMap<>(); for (InnerT inner : innerList) { result.put(name(inner), impl(inner)); } return Collections.unmodifiableMap(result); } }
/** * Converts the passed list of inners to unmodifiable map of impls. * @param innerList list of the inners. * @return map of the impls */ public Map<String, ImplT> convertToUnmodifiableMap(List<InnerT> innerList) { Map<String, ImplT> result = new HashMap<>(); for (InnerT inner : innerList) { result.put(name(inner), impl(inner)); } return Collections.unmodifiableMap(result); } }