Package nablarch.core.util.map
Class MapWrapper<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
nablarch.core.util.map.MapWrapper<K,V>
- Type Parameters:
K- キーの型V- 値の型
- All Implemented Interfaces:
Map<K,V>
- Direct Known Subclasses:
AttributeMap,CaseInsensitiveMap,CopyOnReadMap,HttpCookie,LockableMap,MultipleKeyCaseMap,PartInfoHolder
Mapを実装するクラスの、ラッパークラスを作成するための抽象クラス。
サブクラスでgetDelegateMap()を実装することで、任意のMapに処理を委譲できる。- Author:
- Iwauo Tajima <iwauo@tis.co.jp>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanこのラッパーが処理を委譲するMapオブジェクトを返す。<T> TgetDelegateMapOfType(Class<T> mapType) このインスタンスが処理を委譲しているMapのうち、 指定した型のものを返す。inthashCode()booleanisEmpty()keySet()voidintsize()toString()values()Methods inherited from class java.util.AbstractMap
cloneMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
MapWrapper
public MapWrapper()
-
-
Method Details
-
getDelegateMap
このラッパーが処理を委譲するMapオブジェクトを返す。- Returns:
- 処理を委譲するMapオブジェクト
-
getDelegateMapOfType
このインスタンスが処理を委譲しているMapのうち、 指定した型のものを返す。- Type Parameters:
T- 取得したいMapの型- Parameters:
mapType- 取得したいMapの型- Returns:
- 指定した型に適合するMapインスタンス
-
clear
getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
containsKey
getDelegateMap()が返すMapオブジェクトに処理を委譲する。- Specified by:
containsKeyin interfaceMap<K,V> - Overrides:
containsKeyin classAbstractMap<K,V>
-
containsValue
getDelegateMap()が返すMapオブジェクトに処理を委譲する。- Specified by:
containsValuein interfaceMap<K,V> - Overrides:
containsValuein classAbstractMap<K,V>
-
entrySet
getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
get
getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
isEmpty
getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
keySet
getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
put
getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
putAll
getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
remove
getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
size
getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
values
getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
equals
-
hashCode
public int hashCode() -
toString
- Overrides:
toStringin classAbstractMap<K,V>
-