net.hasor.jdbc.core
类 LinkedCaseInsensitiveMap<V>

java.lang.Object
  继承者 java.util.AbstractMap<K,V>
      继承者 java.util.HashMap<K,V>
          继承者 java.util.LinkedHashMap<String,V>
              继承者 net.hasor.jdbc.core.LinkedCaseInsensitiveMap<V>
所有已实现的接口:
Serializable, Cloneable, Map<String,V>

public class LinkedCaseInsensitiveMap<V>
extends LinkedHashMap<String,V>

LinkedHashMap variant that stores String keys in a case-insensitive manner, for example for key-based access in a results table.

Preserves the original order as well as the original casing of keys, while allowing for contains, get and remove calls with any case of key.

Does not support null keys.

从以下版本开始:
3.0
作者:
Juergen Hoeller
另请参见:
序列化表格

嵌套类摘要
 
从类 java.util.AbstractMap 继承的嵌套类/接口
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
构造方法摘要
LinkedCaseInsensitiveMap()
          Create a new LinkedCaseInsensitiveMap for the default Locale.
LinkedCaseInsensitiveMap(int initialCapacity)
          Create a new LinkedCaseInsensitiveMap that wraps a LinkedHashMap with the given initial capacity and stores lower-case keys according to the default Locale.
LinkedCaseInsensitiveMap(int initialCapacity, Locale locale)
          Create a new LinkedCaseInsensitiveMap that wraps a LinkedHashMap with the given initial capacity and stores lower-case keys according to the given Locale.
LinkedCaseInsensitiveMap(Locale locale)
          Create a new LinkedCaseInsensitiveMap that stores lower-case keys according to the given Locale.
 
方法摘要
 void clear()
           
 boolean containsKey(Object key)
           
protected  String convertKey(String key)
          Convert the given key to a case-insensitive key.
 V get(Object key)
           
 V put(String key, V value)
           
 V remove(Object key)
           
 
从类 java.util.LinkedHashMap 继承的方法
containsValue, removeEldestEntry
 
从类 java.util.HashMap 继承的方法
clone, entrySet, isEmpty, keySet, putAll, size, values
 
从类 java.util.AbstractMap 继承的方法
equals, hashCode, toString
 
从类 java.lang.Object 继承的方法
finalize, getClass, notify, notifyAll, wait, wait, wait
 
从接口 java.util.Map 继承的方法
entrySet, equals, hashCode, isEmpty, keySet, putAll, size, values
 

构造方法详细信息

LinkedCaseInsensitiveMap

public LinkedCaseInsensitiveMap()
Create a new LinkedCaseInsensitiveMap for the default Locale.

另请参见:
String.toLowerCase()

LinkedCaseInsensitiveMap

public LinkedCaseInsensitiveMap(Locale locale)
Create a new LinkedCaseInsensitiveMap that stores lower-case keys according to the given Locale.

参数:
locale - the Locale to use for lower-case conversion
另请参见:
String.toLowerCase(java.util.Locale)

LinkedCaseInsensitiveMap

public LinkedCaseInsensitiveMap(int initialCapacity)
Create a new LinkedCaseInsensitiveMap that wraps a LinkedHashMap with the given initial capacity and stores lower-case keys according to the default Locale.

参数:
initialCapacity - the initial capacity
另请参见:
String.toLowerCase()

LinkedCaseInsensitiveMap

public LinkedCaseInsensitiveMap(int initialCapacity,
                                Locale locale)
Create a new LinkedCaseInsensitiveMap that wraps a LinkedHashMap with the given initial capacity and stores lower-case keys according to the given Locale.

参数:
initialCapacity - the initial capacity
locale - the Locale to use for lower-case conversion
另请参见:
String.toLowerCase(java.util.Locale)
方法详细信息

put

public V put(String key,
             V value)
指定者:
接口 Map<String,V> 中的 put
覆盖:
HashMap<String,V> 中的 put

containsKey

public boolean containsKey(Object key)
指定者:
接口 Map<String,V> 中的 containsKey
覆盖:
HashMap<String,V> 中的 containsKey

get

public V get(Object key)
指定者:
接口 Map<String,V> 中的 get
覆盖:
LinkedHashMap<String,V> 中的 get

remove

public V remove(Object key)
指定者:
接口 Map<String,V> 中的 remove
覆盖:
HashMap<String,V> 中的 remove

clear

public void clear()
指定者:
接口 Map<String,V> 中的 clear
覆盖:
LinkedHashMap<String,V> 中的 clear

convertKey

protected String convertKey(String key)
Convert the given key to a case-insensitive key.

The default implementation converts the key to lower-case according to this Map's Locale.

参数:
key - the user-specified key
返回:
the key to use for storing
另请参见:
String.toLowerCase(java.util.Locale)


Copyright © 2013-2014. All Rights Reserved.