All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.hutool.core.map.CaseInsensitiveLinkedMap Maven / Gradle / Ivy

Go to download

Hutool是一个小而全的Java工具类库,通过静态方法封装,降低相关API的学习成本,提高工作效率,使Java拥有函数式语言般的优雅,让Java语言也可以“甜甜的”。

There is a newer version: 5.8.34
Show newest version
package cn.hutool.core.map;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 忽略大小写的LinkedHashMap
* 对KEY忽略大小写,get("Value")和get("value")获得的值相同,put进入的值也会被覆盖 * * @author Looly * * @param 键类型 * @param 值类型 * @since 3.3.1 */ public class CaseInsensitiveLinkedMap extends CaseInsensitiveMap { private static final long serialVersionUID = 4043263744224569870L; // ------------------------------------------------------------------------- Constructor start /** * 构造 */ public CaseInsensitiveLinkedMap() { this(DEFAULT_INITIAL_CAPACITY); } /** * 构造 * * @param initialCapacity 初始大小 */ public CaseInsensitiveLinkedMap(int initialCapacity) { this(initialCapacity, DEFAULT_LOAD_FACTOR); } /** * 构造 * * @param m Map */ public CaseInsensitiveLinkedMap(Map m) { this(DEFAULT_LOAD_FACTOR, m); } /** * 构造 * * @param loadFactor 加载因子 * @param m Map * @since 3.1.2 */ public CaseInsensitiveLinkedMap(float loadFactor, Map m) { this(m.size(), loadFactor); this.putAll(m); } /** * 构造 * * @param initialCapacity 初始大小 * @param loadFactor 加载因子 */ public CaseInsensitiveLinkedMap(int initialCapacity, float loadFactor) { super(new LinkedHashMap<>(initialCapacity, loadFactor)); } // ------------------------------------------------------------------------- Constructor end }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy