ariba.util.core
Class WriteResistantMap<K,V>

java.lang.Object
  extended by ariba.util.core.ReadOnlyMap<K,V>
      extended by ariba.util.core.WriteResistantMap<K,V>
Type Parameters:
K - Key class
V - Value class

public class WriteResistantMap<K,V>
extends ReadOnlyMap<K,V>

Similar to a ReadOnlyMap, but with a method getMap enabling the caller to get direct access to the underlying Map, which may then be modified. This "hole in the firewall" should be used only with extreme caution, and in circumstances where an optimized way of modifying the state is jusified.


Nested Class Summary
 
Nested classes/interfaces inherited from class ariba.util.core.ReadOnlyMap
ReadOnlyMap.Entry<K,V>
 
Field Summary
 
Fields inherited from class ariba.util.core.ReadOnlyMap
Dot
 
Constructor Summary
WriteResistantMap(java.util.Map<K,V> aMap)
           
 
Method Summary
static WriteResistantMap emptyInstance()
           
 V get(K key)
           
 java.util.Map<K,V> getMap()
          Do not call this method unless you know exactly what you are doing.
 
Methods inherited from class ariba.util.core.ReadOnlyMap
containsKey, containsValue, entrySet, equals, getPath, hashCode, immutableMap, immutableMap, isEmpty, isNullOrEmpty, keySet, mapCopy, mapCopy, size, toString, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WriteResistantMap

public WriteResistantMap(java.util.Map<K,V> aMap)
Method Detail

emptyInstance

public static WriteResistantMap emptyInstance()

get

public V get(K key)
Overrides:
get in class ReadOnlyMap<K,V>

getMap

public java.util.Map<K,V> getMap()
Do not call this method unless you know exactly what you are doing.

Returns:
The wrapped map


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.