List of usage examples for org.springframework.util LinkedCaseInsensitiveMap LinkedCaseInsensitiveMap
public LinkedCaseInsensitiveMap()
From source file:org.gageot.excel.core.ColumnMapRowMapper.java
/** * Create a Map instance to be used as column map. * <p>By default, a linked case-insensitive Map will be created. * @param columnCount the column count, to be used as initial * capacity for the Map//from w ww. j ava 2 s. co m * @return the new Map instance * @see org.springframework.util.LinkedCaseInsensitiveMap */ protected Map<String, T> createColumnMap(int columnCount) { return new LinkedCaseInsensitiveMap<T>(); }
From source file:cz.jirutka.spring.data.jdbc.BaseJdbcRepository.java
private Map<String, Object> columns(T entity) { Map<String, Object> columns = new LinkedCaseInsensitiveMap<>(); columns.putAll(rowUnmapper.mapColumns(entity)); return columns; }
From source file:lib.JdbcTemplate.java
/** * Create a Map instance to be used as results map. * <p>If "isResultsMapCaseInsensitive" has been set to true, * a linked case-insensitive Map will be created. * @return the results Map instance/* ww w .j a v a2 s. com*/ * @see #setResultsMapCaseInsensitive */ protected Map<String, Object> createResultsMap() { if (isResultsMapCaseInsensitive()) { return new LinkedCaseInsensitiveMap<Object>(); } else { return new LinkedHashMap<String, Object>(); } }
From source file:org.springframework.http.server.reactive.ServletServerHttpRequest.java
private static HttpHeaders initHeaders(HttpServletRequest request) { HttpHeaders headers = new HttpHeaders(); for (Enumeration<?> names = request.getHeaderNames(); names.hasMoreElements();) { String name = (String) names.nextElement(); for (Enumeration<?> values = request.getHeaders(name); values.hasMoreElements();) { headers.add(name, (String) values.nextElement()); }// ww w .j a v a 2 s. c o m } MediaType contentType = headers.getContentType(); if (contentType == null) { String requestContentType = request.getContentType(); if (StringUtils.hasLength(requestContentType)) { contentType = MediaType.parseMediaType(requestContentType); headers.setContentType(contentType); } } if (contentType != null && contentType.getCharset() == null) { String encoding = request.getCharacterEncoding(); if (StringUtils.hasLength(encoding)) { Charset charset = Charset.forName(encoding); Map<String, String> params = new LinkedCaseInsensitiveMap<>(); params.putAll(contentType.getParameters()); params.put("charset", charset.toString()); headers.setContentType(new MediaType(contentType.getType(), contentType.getSubtype(), params)); } } if (headers.getContentLength() == -1) { int contentLength = request.getContentLength(); if (contentLength != -1) { headers.setContentLength(contentLength); } } return headers; }