io.polaris.core.map.CaseInsensitiveMap Maven / Gradle / Ivy
package io.polaris.core.map;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.function.Function;
import java.util.function.Supplier;
/**
* @author Qt
* @since 1.8
*/
@SuppressWarnings({"unchecked", "rawtypes"})
public class CaseInsensitiveMap extends TransformMap {
private static final Function TRANSFORMER_UPPER_CASE = key -> (key instanceof CharSequence ? key.toString().toUpperCase() : key);
private static final Function TRANSFORMER_LOWER_CASE = key -> (key instanceof CharSequence ? key.toString().toLowerCase() : key);
public CaseInsensitiveMap(Supplier