org.apache.sling.resourceaccesssecurity.impl
Class ReadOnlyValueMapWrapper

java.lang.Object
  extended by org.apache.sling.api.wrappers.ValueMapDecorator
      extended by org.apache.sling.resourceaccesssecurity.impl.ReadOnlyValueMapWrapper
All Implemented Interfaces:
Map<String,Object>, org.apache.sling.api.resource.ValueMap

public class ReadOnlyValueMapWrapper
extends org.apache.sling.api.wrappers.ValueMapDecorator
implements org.apache.sling.api.resource.ValueMap

Wrapper class that does protect the underlying map from modifications.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from interface org.apache.sling.api.resource.ValueMap
EMPTY
 
Constructor Summary
ReadOnlyValueMapWrapper(Map<String,Object> base)
          Creates a new wrapper around a given map.
 
Method Summary
 void clear()
           
 Object put(String key, Object value)
           
 void putAll(Map<? extends String,?> t)
           
 Object remove(Object key)
           
 
Methods inherited from class org.apache.sling.api.wrappers.ValueMapDecorator
containsKey, containsValue, entrySet, get, get, get, isEmpty, keySet, size, toString, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.sling.api.resource.ValueMap
get, get
 
Methods inherited from interface java.util.Map
containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, size, values
 

Constructor Detail

ReadOnlyValueMapWrapper

public ReadOnlyValueMapWrapper(Map<String,Object> base)
Creates a new wrapper around a given map.

Parameters:
base - wrapped object
Method Detail

put

public Object put(String key,
                  Object value)
Specified by:
put in interface Map<String,Object>
Overrides:
put in class org.apache.sling.api.wrappers.ValueMapDecorator

remove

public Object remove(Object key)
Specified by:
remove in interface Map<String,Object>
Overrides:
remove in class org.apache.sling.api.wrappers.ValueMapDecorator

putAll

public void putAll(Map<? extends String,?> t)
Specified by:
putAll in interface Map<String,Object>
Overrides:
putAll in class org.apache.sling.api.wrappers.ValueMapDecorator

clear

public void clear()
Specified by:
clear in interface Map<String,Object>
Overrides:
clear in class org.apache.sling.api.wrappers.ValueMapDecorator


Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.