org.apache.commons.collections.map

Class UnmodifiableMap

public final class UnmodifiableMap extends AbstractMapDecorator implements IterableMap, Unmodifiable, Serializable

Decorates another Map to ensure it can't be altered.

This class is Serializable from Commons Collections 3.1.

Since: Commons Collections 3.0

Version: $Revision: 155406 $ $Date: 2005-02-26 12:55:26 +0000 (Sat, 26 Feb 2005) $

Author: Stephen Colebourne

Method Summary
voidclear()
static Mapdecorate(Map map)
Factory method to create an unmodifiable map.
SetentrySet()
SetkeySet()
MapIteratormapIterator()
Objectput(Object key, Object value)
voidputAll(Map mapToCopy)
Objectremove(Object key)
Collectionvalues()

Method Detail

clear

public void clear()

decorate

public static Map decorate(Map map)
Factory method to create an unmodifiable map.

Parameters: map the map to decorate, must not be null

Throws: IllegalArgumentException if map is null

entrySet

public Set entrySet()

keySet

public Set keySet()

mapIterator

public MapIterator mapIterator()

put

public Object put(Object key, Object value)

putAll

public void putAll(Map mapToCopy)

remove

public Object remove(Object key)

values

public Collection values()
Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.