## org.apache.taglibs.standard.lang.jstl
Class EnumeratedMap

    java.lang.Object
      org.apache.taglibs.standard.lang.jstl.EnumeratedMap

All Implemented Interfaces:
  Map

    public abstract class EnumeratedMap

extends Object
implements Map

This is a Map implementation driven by a data source that only provides an enumeration of keys and a getValue(key) method. This class must be subclassed to implement those methods.

Some of the methods may incur a performance penalty that involves enumerating the entire data source. In these cases, the Map will try to save the results of that enumeration, but only if the underlying data source is immutable.

Version:
  $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: tcfujii $
Author:
  Nathan Abramson - Art Technology Group

Nested Class Summary

Nested classes/interfaces inherited from interface java.util.Map
`Map.Entry<K,V>`

Constructor Summary
`EnumeratedMap()`

Method Summary
`void` `clear()`
`boolean` `containsKey(Object pKey)`
`boolean` `containsValue(Object pValue)`
`Set` `entrySet()`
`abstract Enumeration` `enumerateKeys()` Returns an enumeration of the keys
`Object` `get(Object pKey)`
`Map` `getAsMap()` Converts the MapSource to a Map.
`abstract Object` `getValue(Object pKey)` Returns the value associated with the given key, or null if not found.
`boolean` `isEmpty()`
`abstract boolean` `isMutable()` Returns true if it is possible for this data source to change
`Set` `keySet()`
`Object` `put(Object pKey, Object pValue)`
`void` `putAll(Map pMap)`
`Object` `remove(Object pKey)`
`int` `size()`
`Collection` `values()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Map
`equals, hashCode`

Constructor Detail

### EnumeratedMap

    public EnumeratedMap()

Method Detail

### clear

    public void clear()

  Specified by:
    `clear` in interface `Map`

### containsKey

    public boolean containsKey(Object pKey)

  Specified by:
    `containsKey` in interface `Map`

### containsValue

    public boolean containsValue(Object pValue)

  Specified by:
    `containsValue` in interface `Map`

### entrySet

    public Set entrySet()

  Specified by:
    `entrySet` in interface `Map`

### get

    public Object get(Object pKey)

  Specified by:
    `get` in interface `Map`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `Map`

### keySet

    public Set keySet()

  Specified by:
    `keySet` in interface `Map`

### put

    public Object put(Object pKey,
                      Object pValue)

  Specified by:
    `put` in interface `Map`

### putAll

    public void putAll(Map pMap)

  Specified by:
    `putAll` in interface `Map`

### remove

    public Object remove(Object pKey)

  Specified by:
    `remove` in interface `Map`

### size

    public int size()

  Specified by:
    `size` in interface `Map`

### values

    public Collection values()

  Specified by:
    `values` in interface `Map`

### enumerateKeys

    public abstract Enumeration enumerateKeys()

  Returns an enumeration of the keys

### isMutable

    public abstract boolean isMutable()

  Returns true if it is possible for this data source to change

### getValue

    public abstract Object getValue(Object pKey)

  Returns the value associated with the given key, or null if not found.

### getAsMap

    public Map getAsMap()

  Converts the MapSource to a Map. If the map is not mutable, this is cached

Copyright © 2008 Mort Bay Consulting. All Rights Reserved.